EntitySet.@Deprecated
public class EntitySet
extends com.google.common.collect.ForwardingSet<io.jmix.core.Entity>
implements java.io.Serializable
Set<Entity> with convenient methods for getting entities by a prototype instance
or by a class and id.| Constructor and Description |
|---|
EntitySet()
Deprecated.
|
EntitySet(java.util.Collection entities)
Deprecated.
|
EntitySet(java.util.Set<?> entities)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Set |
delegate()
Deprecated.
|
<T> T |
get(java.lang.Class<T> entityClass,
java.lang.Object entityId)
Deprecated.
Returns the entity if it exists in the set.
|
<T> T |
get(T prototype)
Deprecated.
Returns the entity if it exists in the set.
|
static EntitySet |
of(java.util.Collection<?> entities)
Deprecated.
Creates the
EntitySet by copying the given collection to the internal set. |
static EntitySet |
of(java.util.Set<?> entities)
Deprecated.
Creates the
EntitySet wrapping an existing set. |
<T> java.util.Optional<T> |
optional(java.lang.Class<T> entityClass,
java.lang.Object entityId)
Deprecated.
Returns the entity wrapped in
Optional if it exists in the set. |
<T> java.util.Optional<T> |
optional(T prototype)
Deprecated.
Returns the entity wrapped in
Optional if it exists in the set. |
equals, hashCode, standardEquals, standardHashCode, standardRemoveAlladd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic EntitySet()
public EntitySet(java.util.Set<?> entities)
public EntitySet(java.util.Collection entities)
public static EntitySet of(java.util.Set<?> entities)
EntitySet wrapping an existing set.public static EntitySet of(java.util.Collection<?> entities)
EntitySet by copying the given collection to the internal set.public <T> java.util.Optional<T> optional(java.lang.Class<T> entityClass,
java.lang.Object entityId)
Optional if it exists in the set.entityClass - class of entityentityId - entity idpublic <T> java.util.Optional<T> optional(T prototype)
Optional if it exists in the set.prototype - a prototype instance whose class and id are used to look up an entity in the set.public <T> T get(java.lang.Class<T> entityClass,
java.lang.Object entityId)
entityClass - class of entityentityId - entity idjava.lang.IllegalArgumentException - if the entity not foundpublic <T> T get(T prototype)
prototype - a prototype instance whose class and id are used to look up an entity in the set.java.lang.IllegalArgumentException - if the entity not foundprotected java.util.Set delegate()
delegate in class com.google.common.collect.ForwardingSet<io.jmix.core.Entity>