Class MarshallableDeque<T>

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

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

    • create

      public static <T> MarshallableDeque<T> create(Queue<T> queue)
      Parameters:
      queue - the Queue to be wrapped as a Deque
      Returns:
      a new MarshallableDeque instance containing the passed object if the object is not null, otherwise null. If the passed queue is not a Deque implementation, a new one is created.
    • create

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

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

      public Deque<T> get()