Class MarshallableList<T>

java.lang.Object
org.infinispan.marshall.protostream.impl.MarshallableList<T>

@ProtoTypeId(19) public class MarshallableList<T> extends Object
A wrapper for a List of objects whose type is unknown until runtime. This is equivalent to utilising a List without the overhead of creating a MarshallableObject per entry.
Since:
16.0
Author:
Ryan Emerson
  • Method Details

    • create

      public static <T> MarshallableList<T> create(List<T> list)
      Parameters:
      list - the List to be wrapped.
      Returns:
      a new MarshallableList instance containing the passed object if the object is not null, otherwise null.
    • unwrap

      public static <T> List<T> unwrap(MarshallableList<T> wrapper)
      Parameters:
      wrapper - the MarshallableList instance to unwrap.
      Returns:
      the wrapped List or null if the provided wrapper does not exist.
    • get

      public List<T> get()