protected class AbstractExtendedSet.ExtendedSubSet extends AbstractExtendedSet.FilteredSet
AbstractExtendedSet#headSet(T) , AbstractExtendedSet#tailSet(T) and AbstractExtendedSet#subSet(T,T) to offer a restricted view of the entire setExtendedSet.ExtendedIterator<X>| Constructor and Description |
|---|
AbstractExtendedSet.ExtendedSubSet(T min,
T max)
Creates the subset
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T e) |
boolean |
addAll(Collection<? extends T> c) |
void |
clear() |
void |
clear(T from,
T to)
Removes from the set all the elements between
first and
last, both included. |
ExtendedSet<T> |
clone()
See the
clone() of Object |
void |
complement()
Complements the current set.
|
ExtendedSet<T> |
complemented()
Generates the complement set.
|
int |
complementSize()
Computes the complement set size.
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
containsAny(Collection<? extends T> other)
Returns
true if the specified Collection instance
contains any elements that are also contained within this
ExtendedSet instance |
boolean |
containsAtLeast(Collection<? extends T> other,
int minElements)
Returns
true if the specified Collection instance
contains at least minElements elements that are also
contained within this ExtendedSet instance |
String |
debugInfo()
Prints debug info about the given
ExtendedSet implementation |
Iterable<T> |
descending()
Allows to use the Java "for-each" statement in descending order
|
void |
fill(T from,
T to)
Adds to the set all the elements between
first and
last, both included. |
void |
flip(T e)
Adds the element if it not existing, or removes it if existing
|
T |
get(int i)
Gets the
ith element of the set |
ExtendedSet<T> |
headSet(T toElement) |
int |
indexOf(T e)
Provides position of element within the set.
|
protected ExtendedSet<T> |
raw() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
ExtendedSet<T> |
subSet(T fromElement,
T toElement) |
ExtendedSet<T> |
tailSet(T fromElement) |
bitmapCompressionRatio, collectionCompressionRatio, comparator, compareTo, convert, convert, descendingIterator, difference, differenceSize, empty, equals, first, hashCode, intersection, intersectionSize, isEmpty, iterator, jaccardDistance, jaccardSimilarity, last, powerSet, powerSet, powerSetSize, powerSetSize, symmetricDifference, symmetricDifferenceSize, toArray, toArray, toString, union, unionSize, unmodifiable, weightedJaccardDistance, weightedJaccardSimilarityprotected ExtendedSet<T> raw()
raw in class AbstractExtendedSet.FilteredSetpublic ExtendedSet<T> headSet(T toElement)
ExtendedSetpublic ExtendedSet<T> subSet(T fromElement, T toElement)
ExtendedSetpublic ExtendedSet<T> tailSet(T fromElement)
ExtendedSetpublic boolean addAll(Collection<? extends T> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>containsAll in interface Set<T>containsAll in class AbstractExtendedSet.FilteredSetpublic boolean add(T e)
public void clear()
public boolean contains(Object o)
contains in interface Collection<T>contains in interface Set<T>contains in class AbstractExtendedSet.FilteredSetpublic boolean remove(Object o)
public int size()
size in interface Collection<T>size in interface Set<T>size in class AbstractExtendedSet.FilteredSetpublic void complement()
ExtendedSetSortedSet.last() that do not exist in the
current set.ExtendedSet.complemented()public int complementSize()
ExtendedSet
This is faster than calling ExtendedSet.complemented() and then
Set.size()
complementSize in interface ExtendedSet<T>complementSize in class AbstractExtendedSet.FilteredSetpublic ExtendedSet<T> complemented()
ExtendedSetSortedSet.last() that do not exist in the
current set.complemented in interface ExtendedSet<T>complemented in class AbstractExtendedSet.FilteredSetExtendedSet.complement()public String debugInfo()
ExtendedSetExtendedSet implementationdebugInfo in interface ExtendedSet<T>debugInfo in class AbstractExtendedSet.FilteredSetpublic void clear(T from, T to)
ExtendedSetfirst and
last, both included. It supposes that there is an ordering
of the elements of type T and that the universe of all
possible elements is known.from - first elementto - last elementpublic boolean containsAny(Collection<? extends T> other)
ExtendedSettrue if the specified Collection instance
contains any elements that are also contained within this
ExtendedSet instancecontainsAny in interface ExtendedSet<T>containsAny in class AbstractExtendedSet.FilteredSetother - ExtendedSet to intersect withExtendedSet intersects
the specified ExtendedSet.public boolean containsAtLeast(Collection<? extends T> other, int minElements)
ExtendedSettrue if the specified Collection instance
contains at least minElements elements that are also
contained within this ExtendedSet instancecontainsAtLeast in interface ExtendedSet<T>containsAtLeast in class AbstractExtendedSet.FilteredSetother - Collection instance to intersect withminElements - minimum number of elements to be contained within this
ExtendedSet instanceExtendedSet intersects
the specified Collection.public Iterable<T> descending()
ExtendedSetdescending in interface ExtendedSet<T>descending in class AbstractExtendedSet.FilteredSetIterable instance to iterate items in descending
orderpublic void fill(T from, T to)
ExtendedSetfirst and
last, both included. It supposes that there is an ordering
of the elements of type T and that the universe of all
possible elements is known.from - first elementto - last elementpublic void flip(T e)
ExtendedSete - element to flipExtendedSet.symmetricDifference(Collection)public T get(int i)
ExtendedSetith element of the setget in interface ExtendedSet<T>get in class AbstractExtendedSet.FilteredSeti - position of the element in the sorted setith element of the setpublic int indexOf(T e)
ExtendedSetIt returns -1 if the element does not exist within the set.
indexOf in interface ExtendedSet<T>indexOf in class AbstractExtendedSet.FilteredSete - element of the setpublic ExtendedSet<T> clone()
ExtendedSetclone() of Objectclone in interface ExtendedSet<T>clone in class AbstractExtendedSet.FilteredSetCopyright © 2016. All rights reserved.