Class ObjectSet<O extends ObjectType>
java.lang.Object
com.evolveum.midpoint.schema.util.ObjectSet<O>
- All Implemented Interfaces:
- Iterable<O>,- Collection<O>
This is a set of objects that considers objects being equal by simply comparing their OIDs.
 It should be more efficient and robust than e.g. 
HashSet that uses AbstractMutableObjectable.hashCode() and
 ObjectType.equals(Object) methods.
 We intentionally do not implement Set interface, because we do not fulfill its contract.
 Requirement: only objects with OID can be stored here.
 TODO better name- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanbooleanaddAll(@NotNull Collection<? extends O> c) asList()@NotNull List<PrismObject<O>>voidclear()booleanbooleancontainsAll(@NotNull Collection<?> c) booleancontainsOid(String oid) booleanisEmpty()iterator()static <O extends ObjectType>
 ObjectSet<O>of(O... objects) static <O extends ObjectType>
 ObjectSet<O>ofPrismObjects(Collection<PrismObject<O>> objects) oidSet()booleanbooleanremoveAll(@NotNull Collection<?> c) booleanretainAll(@NotNull Collection<?> c) intsize()@NotNull Object[]toArray()<T> @NotNull T[]toArray(@NotNull T[] a) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collectionequals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
- 
Constructor Details- 
ObjectSetpublic ObjectSet()
- 
ObjectSet
 
- 
- 
Method Details- 
of
- 
ofPrismObjectspublic static <O extends ObjectType> ObjectSet<O> ofPrismObjects(Collection<PrismObject<O>> objects) 
- 
sizepublic int size()- Specified by:
- sizein interface- Collection<O extends ObjectType>
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Collection<O extends ObjectType>
 
- 
contains- Specified by:
- containsin interface- Collection<O extends ObjectType>
 
- 
iterator- Specified by:
- iteratorin interface- Collection<O extends ObjectType>
- Specified by:
- iteratorin interface- Iterable<O extends ObjectType>
 
- 
toArray- Specified by:
- toArrayin interface- Collection<O extends ObjectType>
 
- 
toArray@NotNull public <T> @NotNull T[] toArray(@NotNull @NotNull T[] a) - Specified by:
- toArrayin interface- Collection<O extends ObjectType>
 
- 
add- Specified by:
- addin interface- Collection<O extends ObjectType>
 
- 
remove- Specified by:
- removein interface- Collection<O extends ObjectType>
 
- 
containsAll- Specified by:
- containsAllin interface- Collection<O extends ObjectType>
 
- 
addAll- Specified by:
- addAllin interface- Collection<O extends ObjectType>
 
- 
removeAll- Specified by:
- removeAllin interface- Collection<O extends ObjectType>
 
- 
retainAll- Specified by:
- retainAllin interface- Collection<O extends ObjectType>
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Collection<O extends ObjectType>
 
- 
asList
- 
asPrismObjectList
- 
containsOid
- 
get
- 
oidSet
 
-