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
public interface ICommonsOrderedSet<ELEMENTTYPE> extends ICommonsSet<ELEMENTTYPE>
A special orderedSetbased interface with extended functionality based onICommonsSet.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> ICommonsOrderedSet<T>createInstance()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)ICommonsOrderedSet<ELEMENTTYPE>getClone()default ELEMENTTYPEgetFirst()default ELEMENTTYPEgetFirst(ELEMENTTYPE aDefault)default ELEMENTTYPEgetLast()default ELEMENTTYPEgetLast(ELEMENTTYPE aDefault)-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods 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, setAllMapped
-
Methods 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, getCount
-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsSet
getAsUnmodifiable, replace
-
Methods inherited from interface com.helger.commons.lang.IHasSize
isEmpty, isNotEmpty, size
-
-
-
-
Method Detail
-
createInstance
@Nonnull @ReturnsMutableCopy default <T> ICommonsOrderedSet<T> 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
@Nullable default ELEMENTTYPE getFirst()
-
getFirst
@Nullable default ELEMENTTYPE getFirst(@Nullable ELEMENTTYPE aDefault)
-
getLast
@Nullable default ELEMENTTYPE getLast()
-
getLast
@Nullable default ELEMENTTYPE getLast(@Nullable ELEMENTTYPE aDefault)
-
getClone
@Nonnull @ReturnsMutableCopy ICommonsOrderedSet<ELEMENTTYPE> getClone()
- Specified by:
getClonein interfaceICloneable<ELEMENTTYPE>- Returns:
- A 100% deep-copy of the implementing class.
-
-