Class GenericList<T>

java.lang.Object
io.goobi.viewer.api.rest.model.GenericList<T>
Type Parameters:
T - the element type of the wrapped list

public class GenericList<T> extends Object
Thin wrapper around a Java List that serializes its contents directly as a JSON array via JsonValue. Intended for REST API responses that need to return a typed list as a bare JSON array.
  • Constructor Details

    • GenericList

      public GenericList()
      Creates a new GenericList instance.
    • GenericList

      public GenericList(List<T> theList)
      Creates a new GenericList instance.
      Parameters:
      theList - list of elements to wrap as an unmodifiable list
  • Method Details

    • getList

      public List<T> getList()
      Getter for the field list.
      Returns:
      the wrapped list of elements
    • toString

      public String toString()
      Overrides:
      toString in class Object