T - the type of elements maintained by this setpublic class GenericExtendedSet<T extends Comparable<T>> extends AbstractExtendedSet<T>
ExtendedSet-based class internally managed by an instance of any
class implementing CollectionAbstractExtendedSet.ExtendedSubSet, AbstractExtendedSet.FilteredSet, AbstractExtendedSet.UnmodifiableExtendedSetExtendedSet.ExtendedIterator<X>| Constructor and Description |
|---|
GenericExtendedSet(Class<? extends Collection> setClass)
Empty-set constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T e) |
boolean |
addAll(Collection<? extends T> c) |
double |
bitmapCompressionRatio()
|
void |
clear() |
GenericExtendedSet<T> |
clone()
See the
clone() of Object |
double |
collectionCompressionRatio()
|
Comparator<? super T> |
comparator() |
void |
complement()
Complements the current set.
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
GenericExtendedSet<T> |
convert(Collection<?> c)
Converts a given
Collection instance into an instance of the
current class. |
GenericExtendedSet<T> |
convert(Object... e)
Converts a given integer array into an instance of the current class
|
String |
debugInfo()
Prints debug info about the given
ExtendedSet implementation |
ExtendedSet.ExtendedIterator<T> |
descendingIterator()
Gets the descending order iterator over the elements of type
T |
GenericExtendedSet<T> |
difference(Collection<? extends T> other)
Generates the difference set
|
GenericExtendedSet<T> |
empty()
Generates an empty set
|
boolean |
equals(Object o) |
void |
fill(T from,
T to)
Adds to the set all the elements between
first and
last, both included. |
T |
first() |
int |
hashCode() |
ExtendedSet<T> |
headSet(T toElement) |
GenericExtendedSet<T> |
intersection(Collection<? extends T> other)
Generates the intersection set
|
int |
intersectionSize(Collection<? extends T> other)
Computes the intersection set size.
|
boolean |
isEmpty() |
ExtendedSet.ExtendedIterator<T> |
iterator() |
T |
last() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
ExtendedSet<T> |
subSet(T fromElement,
T toElement) |
GenericExtendedSet<T> |
symmetricDifference(Collection<? extends T> other)
Generates the symmetric difference set
|
ExtendedSet<T> |
tailSet(T fromElement) |
GenericExtendedSet<T> |
union(Collection<? extends T> other)
Generates the union set
|
ExtendedSet<T> |
unmodifiable()
Gets the read-only version of the current set
|
clear, compareTo, complemented, complementSize, containsAny, containsAtLeast, descending, differenceSize, flip, get, indexOf, jaccardDistance, jaccardSimilarity, powerSet, powerSet, powerSetSize, powerSetSize, symmetricDifferenceSize, unionSize, weightedJaccardDistance, weightedJaccardSimilaritytoArray, toArray, toStringpublic GenericExtendedSet(Class<? extends Collection> setClass)
setClass - Collection-derived classpublic double bitmapCompressionRatio()
BitSet, 2 means twice the size of BitSet, etc.)bitmapCompressionRatio in interface ExtendedSet<T extends Comparable<T>>bitmapCompressionRatio in class AbstractExtendedSet<T extends Comparable<T>>public double collectionCompressionRatio()
ArrayList, 2 means twice the size of ArrayList, etc.)collectionCompressionRatio in interface ExtendedSet<T extends Comparable<T>>collectionCompressionRatio in class AbstractExtendedSet<T extends Comparable<T>>public GenericExtendedSet<T> empty()
empty in interface ExtendedSet<T extends Comparable<T>>empty in class AbstractExtendedSet<T extends Comparable<T>>public ExtendedSet.ExtendedIterator<T> iterator()
iterator in interface ExtendedSet<T extends Comparable<T>>iterator in interface Iterable<T extends Comparable<T>>iterator in interface Collection<T extends Comparable<T>>iterator in interface Set<T extends Comparable<T>>iterator in class AbstractExtendedSet<T extends Comparable<T>>public ExtendedSet.ExtendedIterator<T> descendingIterator()
TdescendingIterator in interface ExtendedSet<T extends Comparable<T>>descendingIterator in class AbstractExtendedSet<T extends Comparable<T>>public GenericExtendedSet<T> clone()
clone() of Object
NOTE: When overriding this method, please note that
Object.clone() is much slower then performing
new and "manually" copying data!
clone in interface ExtendedSet<T extends Comparable<T>>clone in class AbstractExtendedSet<T extends Comparable<T>>public String debugInfo()
ExtendedSet implementationdebugInfo in interface ExtendedSet<T extends Comparable<T>>debugInfo in class AbstractExtendedSet<T extends Comparable<T>>public boolean add(T e)
add in interface Collection<T extends Comparable<T>>add in interface Set<T extends Comparable<T>>add in class AbstractCollection<T extends Comparable<T>>public boolean remove(Object o)
remove in interface Collection<T extends Comparable<T>>remove in interface Set<T extends Comparable<T>>remove in class AbstractCollection<T extends Comparable<T>>public boolean contains(Object o)
contains in interface Collection<T extends Comparable<T>>contains in interface Set<T extends Comparable<T>>contains in class AbstractCollection<T extends Comparable<T>>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T extends Comparable<T>>containsAll in interface Set<T extends Comparable<T>>containsAll in class AbstractCollection<T extends Comparable<T>>public boolean addAll(Collection<? extends T> c)
addAll in interface Collection<T extends Comparable<T>>addAll in interface Set<T extends Comparable<T>>addAll in class AbstractCollection<T extends Comparable<T>>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<T extends Comparable<T>>retainAll in interface Set<T extends Comparable<T>>retainAll in class AbstractCollection<T extends Comparable<T>>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<T extends Comparable<T>>removeAll in interface Set<T extends Comparable<T>>removeAll in class AbstractSet<T extends Comparable<T>>public boolean equals(Object o)
equals in interface Collection<T extends Comparable<T>>equals in interface Set<T extends Comparable<T>>equals in class AbstractSet<T extends Comparable<T>>public int size()
size in interface Collection<T extends Comparable<T>>size in interface Set<T extends Comparable<T>>size in class AbstractCollection<T extends Comparable<T>>public boolean isEmpty()
isEmpty in interface Collection<T extends Comparable<T>>isEmpty in interface Set<T extends Comparable<T>>isEmpty in class AbstractCollection<T extends Comparable<T>>public void clear()
clear in interface Collection<T extends Comparable<T>>clear in interface Set<T extends Comparable<T>>clear in class AbstractCollection<T extends Comparable<T>>public int hashCode()
hashCode in interface Collection<T extends Comparable<T>>hashCode in interface Set<T extends Comparable<T>>hashCode in class AbstractSet<T extends Comparable<T>>public Comparator<? super T> comparator()
public T first()
first in interface SortedSet<T extends Comparable<T>>first in class AbstractExtendedSet<T extends Comparable<T>>public T last()
last in interface SortedSet<T extends Comparable<T>>last in class AbstractExtendedSet<T extends Comparable<T>>public ExtendedSet<T> headSet(T toElement)
headSet in interface ExtendedSet<T extends Comparable<T>>headSet in interface SortedSet<T extends Comparable<T>>headSet in class AbstractExtendedSet<T extends Comparable<T>>public ExtendedSet<T> tailSet(T fromElement)
tailSet in interface ExtendedSet<T extends Comparable<T>>tailSet in interface SortedSet<T extends Comparable<T>>tailSet in class AbstractExtendedSet<T extends Comparable<T>>public ExtendedSet<T> subSet(T fromElement, T toElement)
subSet in interface ExtendedSet<T extends Comparable<T>>subSet in interface SortedSet<T extends Comparable<T>>subSet in class AbstractExtendedSet<T extends Comparable<T>>public int intersectionSize(Collection<? extends T> other)
This is faster than calling ExtendedSet.intersection(Collection) and
then Set.size()
intersectionSize in interface ExtendedSet<T extends Comparable<T>>intersectionSize in class AbstractExtendedSet<T extends Comparable<T>>other - Collection instance that represents the right
operandpublic GenericExtendedSet<T> intersection(Collection<? extends T> other)
intersection in interface ExtendedSet<T extends Comparable<T>>intersection in class AbstractExtendedSet<T extends Comparable<T>>other - ExtendedSet instance that represents the right
operandSet.retainAll(java.util.Collection)public GenericExtendedSet<T> union(Collection<? extends T> other)
union in interface ExtendedSet<T extends Comparable<T>>union in class AbstractExtendedSet<T extends Comparable<T>>other - ExtendedSet instance that represents the right
operandSet.addAll(java.util.Collection)public GenericExtendedSet<T> difference(Collection<? extends T> other)
difference in interface ExtendedSet<T extends Comparable<T>>difference in class AbstractExtendedSet<T extends Comparable<T>>other - ExtendedSet instance that represents the right
operandSet.removeAll(java.util.Collection)public GenericExtendedSet<T> symmetricDifference(Collection<? extends T> other)
symmetricDifference in interface ExtendedSet<T extends Comparable<T>>symmetricDifference in class AbstractExtendedSet<T extends Comparable<T>>other - ExtendedSet instance that represents the right
operandExtendedSet.flip(Object)public void complement()
SortedSet.last() that do not exist in the
current set.ExtendedSet.complemented()public ExtendedSet<T> unmodifiable()
unmodifiable in interface ExtendedSet<T extends Comparable<T>>unmodifiable in class AbstractExtendedSet<T extends Comparable<T>>public void fill(T from, T to)
first 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.fill in interface ExtendedSet<T extends Comparable<T>>fill in class AbstractExtendedSet<T extends Comparable<T>>from - first elementto - last elementpublic GenericExtendedSet<T> convert(Collection<?> c)
Collection instance into an instance of the
current class. NOTE: when the collection is already an instance of
the current class, the method returns the collection itself.convert in interface ExtendedSet<T extends Comparable<T>>convert in class AbstractExtendedSet<T extends Comparable<T>>c - collection to use to generate the new instanceExtendedSet.convert(Object...)public GenericExtendedSet<T> convert(Object... e)
convert in interface ExtendedSet<T extends Comparable<T>>convert in class AbstractExtendedSet<T extends Comparable<T>>e - objects to use to generate the new instanceExtendedSet.convert(Collection)Copyright © 2016. All rights reserved.