Interface ICommonsOrderedSet<ELEMENTTYPE>
- Type Parameters:
ELEMENTTYPE- Set element type
- All Superinterfaces:
Collection<ELEMENTTYPE>,ICloneable<ICommonsSet<ELEMENTTYPE>>,ICommonsCollection<ELEMENTTYPE>,ICommonsIterable<ELEMENTTYPE>,ICommonsSet<ELEMENTTYPE>,IHasSize,Iterable<ELEMENTTYPE>,Set<ELEMENTTYPE>
- All Known Implementing Classes:
CommonsLinkedHashSet,LRUSet
A special ordered
Set based interface with extended functionality
based on ICommonsSet.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> ICommonsOrderedSet<T> Create a new empty set.default ICommonsOrderedSet<ELEMENTTYPE> getAll(Predicate<? super ELEMENTTYPE> aFilter) default <DSTTYPE extends ELEMENTTYPE>
ICommonsOrderedSet<DSTTYPE> getAllInstanceOf(Class<DSTTYPE> aDstClass) default <DSTTYPE> ICommonsOrderedSet<DSTTYPE> getAllMapped(Function<? super ELEMENTTYPE, DSTTYPE> aMapper) default <DSTTYPE> ICommonsOrderedSet<DSTTYPE> getAllMapped(Predicate<? super ELEMENTTYPE> aFilter, Function<? super ELEMENTTYPE, DSTTYPE> aMapper) getClone()default ELEMENTTYPEgetFirst()default ELEMENTTYPEgetFirst(ELEMENTTYPE aDefault) default ELEMENTTYPEgetLast()default ELEMENTTYPEgetLast(ELEMENTTYPE aDefault) Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.helger.commons.collection.impl.ICommonsCollection
addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAllMapped, addAllMapped, addAllMapped, addAllMapped, addAllMapped, addAllMapped, addIf, addIfNotNull, addObject, getAtIndex, getAtIndex, getAtIndex, getAtIndex, getAtIndexMapped, getAtIndexMapped, getAtIndexMapped, getAtIndexMapped, getCopyAsList, getCount, getSorted, iterator2, removeAll, removeObject, set, setAll, setAll, setAllMapped, setAllMappedMethods inherited from interface com.helger.commons.collection.impl.ICommonsIterable
containsAny, containsNone, containsOnly, findAll, findAllInstanceOf, findAllMapped, findAllMapped, findAllMapped, findFirst, findFirst, findFirstIndex, findFirstMapped, findFirstMapped, findLastIndex, forEachBreakable, forEachByIndex, forEachThrowing, getCountMethods inherited from interface com.helger.commons.collection.impl.ICommonsSet
getAsUnmodifiable, replaceMethods inherited from interface com.helger.commons.lang.IHasSize
isEmpty, isNotEmpty, size
-
Method Details
-
createInstance
Description copied from interface:ICommonsSetCreate a new empty set. Overwrite this if you don't want to useCommonsHashSet.- Specified by:
createInstancein interfaceICommonsSet<ELEMENTTYPE>- Type Parameters:
T- Set element type- Returns:
- A new empty set. Never
null.
-
getAll
@Nonnull @ReturnsMutableCopy default ICommonsOrderedSet<ELEMENTTYPE> getAll(@Nullable Predicate<? super ELEMENTTYPE> aFilter) - Specified by:
getAllin interfaceICommonsSet<ELEMENTTYPE>
-
getAllMapped
@Nonnull @ReturnsMutableCopy default <DSTTYPE> ICommonsOrderedSet<DSTTYPE> getAllMapped(@Nonnull Function<? super ELEMENTTYPE, DSTTYPE> aMapper) - Specified by:
getAllMappedin interfaceICommonsSet<ELEMENTTYPE>
-
getAllMapped
@Nonnull @ReturnsMutableCopy default <DSTTYPE> ICommonsOrderedSet<DSTTYPE> getAllMapped(@Nullable Predicate<? super ELEMENTTYPE> aFilter, @Nonnull Function<? super ELEMENTTYPE, DSTTYPE> aMapper) - Specified by:
getAllMappedin interfaceICommonsSet<ELEMENTTYPE>
-
getAllInstanceOf
@Nonnull @ReturnsMutableCopy default <DSTTYPE extends ELEMENTTYPE> ICommonsOrderedSet<DSTTYPE> getAllInstanceOf(@Nonnull Class<DSTTYPE> aDstClass) - Specified by:
getAllInstanceOfin interfaceICommonsSet<ELEMENTTYPE>
-
getFirst
-
getFirst
-
getLast
-
getLast
-
getClone
- Specified by:
getClonein interfaceICloneable<ELEMENTTYPE>- Returns:
- A 100% deep-copy of the implementing class.
-