Class BatchedEntityIdWithRevisions<E extends EntityIdWithRevision<?>>
- java.lang.Object
-
- org.eclipse.ditto.internal.models.streaming.BatchedEntityIdWithRevisions<E>
-
- All Implemented Interfaces:
org.eclipse.ditto.base.model.headers.WithManifest,org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>,StreamingMessage
@Immutable public final class BatchedEntityIdWithRevisions<E extends EntityIdWithRevision<?>> extends java.lang.Object implements org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>, StreamingMessage, org.eclipse.ditto.base.model.headers.WithManifest
A list ofEntityIdWithRevisionbatched together.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable
org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends java.lang.Object>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,T extends java.lang.Object>
-
-
Field Summary
-
Fields inherited from interface org.eclipse.ditto.internal.models.streaming.StreamingMessage
TYPE_PREFIX
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends EntityIdWithRevision<?>>
java.util.function.Function<org.eclipse.ditto.json.JsonObject,org.eclipse.ditto.base.model.json.Jsonifiable<?>>deserializer(java.util.function.Function<org.eclipse.ditto.json.JsonObject,T> elementDeserializer)Create a deserializer from a deserializer of the elements.booleanequals(java.lang.Object obj)java.util.List<E>getElements()Retrieve the elements.java.lang.StringgetManifest()inthashCode()static <T extends EntityIdWithRevision<?>>
BatchedEntityIdWithRevisions<T>of(java.lang.Class<T> elementClass, java.util.List<T> elements)Create aBatchedEntityIdWithRevisionsobject.org.eclipse.ditto.json.JsonObjecttoJson()java.lang.StringtoString()static <T extends EntityIdWithRevision<?>>
java.lang.StringtypeOf(java.lang.Class<T> elementClass)Create a type name for the JSON deserializer based on the type of elements.
-
-
-
Method Detail
-
of
public static <T extends EntityIdWithRevision<?>> BatchedEntityIdWithRevisions<T> of(java.lang.Class<T> elementClass, java.util.List<T> elements)
Create aBatchedEntityIdWithRevisionsobject.- Type Parameters:
T- type of the elements.- Parameters:
elementClass- class of the elements.elements- the batched elements.- Returns:
- a new
BatchedEntityIdWithRevisionsobject.
-
typeOf
public static <T extends EntityIdWithRevision<?>> java.lang.String typeOf(java.lang.Class<T> elementClass)
Create a type name for the JSON deserializer based on the type of elements.- Type Parameters:
T- type of the elements.- Parameters:
elementClass- class of the elements.- Returns:
- type name of
BatchedEntityIdWithRevisionswith elements of typeT.
-
deserializer
public static <T extends EntityIdWithRevision<?>> java.util.function.Function<org.eclipse.ditto.json.JsonObject,org.eclipse.ditto.base.model.json.Jsonifiable<?>> deserializer(java.util.function.Function<org.eclipse.ditto.json.JsonObject,T> elementDeserializer)
Create a deserializer from a deserializer of the elements.- Type Parameters:
T- type of the elements.- Parameters:
elementDeserializer- deserializer for the elements.- Returns:
- deserializer for
BatchedEntityIdWithRevisionswith elements of typeT.
-
getElements
public java.util.List<E> getElements()
Retrieve the elements.- Returns:
- the elements.
-
toJson
public org.eclipse.ditto.json.JsonObject toJson()
- Specified by:
toJsonin interfaceorg.eclipse.ditto.base.model.json.Jsonifiable<E extends EntityIdWithRevision<?>>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getManifest
@Nonnull public java.lang.String getManifest()
- Specified by:
getManifestin interfaceorg.eclipse.ditto.base.model.headers.WithManifest
-
-