Package de.hybris.platform.core
Class LazyLoadItemSet<E>
java.lang.Object
de.hybris.platform.core.LazyLoadItemSet<E>
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,Set<E>
SortedSet version of
LazyLoadItemList which simply wraps a load item list and in addition ensures uniqueness
when adding new items to the set.
Please note that the sort order is based upon the item pk insert order only. If a new item is inserted it is simply added at last position.
Also note that the comparator should not be used outside of this set instance since it compares items by their position within this set.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> collection) voidclear()booleanbooleancontainsAll(Collection<?> collection) booleanprotected intgetPosition(Object object) inthashCode()booleanisEmpty()booleaniterator()booleanbooleanremoveAll(Collection<?> collection) booleanretainAll(Collection<?> collection) voidsetModifiable(boolean modifiable) intsize()Object[]toArray()<T> T[]toArray(T[] array) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
LazyLoadItemSet
public LazyLoadItemSet() -
LazyLoadItemSet
-
-
Method Details
-
iterator
-
size
public int size() -
equals
-
hashCode
public int hashCode() -
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
add
-
addAll
-
clear
public void clear() -
isEmpty
public boolean isEmpty() -
remove
-
removeAll
-
retainAll
-
toArray
-
toArray
public <T> T[] toArray(T[] array) -
getPosition
-
isModifiable
public boolean isModifiable()- Returns:
- the modifiable
-
setModifiable
public void setModifiable(boolean modifiable) - Parameters:
modifiable- the modifiable to set
-