Class MarshallableSet<T>
java.lang.Object
org.infinispan.marshall.protostream.impl.MarshallableSet<T>
A wrapper for a
Set of objects whose type is unknown until runtime. This is equivalent to utilising a
Set without the overhead of creating a MarshallableObject per
entry.- Since:
- 16.0
- Author:
- Ryan Emerson
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> MarshallableSet<T> get()static <T> Set<T> unwrap(MarshallableSet<T> wrapper) static <R extends Set<T>, T>
Runwrap(MarshallableSet<T> wrapper, Function<Set<T>, R> builder)
-
Method Details
-
create
- Parameters:
set- theSetto be wrapped.- Returns:
- a new
MarshallableSetinstance containing the passed object if the object is not null, otherwise null.
-
unwrap
- Parameters:
wrapper- theMarshallableSetinstance to unwrap.- Returns:
- the wrapped
Setor null if the provided wrapper does not exist.
-
unwrap
public static <R extends Set<T>, T> R unwrap(MarshallableSet<T> wrapper, Function<Set<T>, R> builder) -
get
-