DiscreteDomain. Example:
ContiguousSet.create(Range.closed(5, 42), DiscreteDomain.integers())
Note that because bounded ranges over int and long values are so common, this
particular example can be written as just:
ContiguousSet.closed(5, 42)
Warning
Be extremely careful what you do with conceptually large instances (such as
ContiguousSet.create(Range.greaterThan(0), DiscreteDomain.integers()). Certain operations
on such a set can be performed efficiently, but others (such as Set#hashCode or Collections#frequency) can cause major performance problems.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final DiscreteDomain |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static <E> ImmutableSortedSet. | builder()
Hides com.
Deprecated
Use
Not supported.
create.
|
| public static ContiguousSet | closed(int lower, int upper)
Returns a nonempty contiguous set containing all |
| public static ContiguousSet | closed(long lower, long upper)
Returns a nonempty contiguous set containing all |
| public static ContiguousSet | closedOpen(int lower, int upper)
Returns a contiguous set containing all |
| public static ContiguousSet | closedOpen(long lower, long upper)
Returns a contiguous set containing all |
| public static <C extends Comparable | create(Range<C> range, DiscreteDomain<C> domain)
Returns a |
| pack-priv ImmutableSortedSet | createDescendingSet()
Implements abstract com. |
| public ContiguousSet | headSet(C
high endpoint (exclusive) of the returned set toElement)Overrides com. Implements java. toElement.
|
| public ContiguousSet | headSet(C
high endpoint of the returned set toElement, boolean true if the high endpoint
is to be included in the returned viewOverrides com. Implements java. inclusive is true) toElement.
|
| pack-priv abstract ContiguousSet | headSetImpl(C toElement, boolean inclusive)
Implements abstract com. |
| public abstract ContiguousSet | intersection(ContiguousSet<C> other)
Returns the set of values that are contained in both this set and the other. |
| public abstract Range | range()
Returns a range, closed on both ends, whose endpoints are the minimum and maximum values contained in this set. |
| public abstract Range | |
| public ContiguousSet | subSet(C
low endpoint (inclusive) of the returned set fromElement, C high endpoint (exclusive) of the returned set toElement)Overrides com. Implements java. fromElement, inclusive, to toElement,
exclusive.
|
| public ContiguousSet | subSet(C
low endpoint of the returned set fromElement, boolean true if the low endpoint
is to be included in the returned viewhigh endpoint of the returned set toElement, boolean true if the high endpoint
is to be included in the returned viewOverrides com. Implements java. fromElement to toElement.
|
| pack-priv abstract ContiguousSet | subSetImpl(C fromElement, boolean fromInclusive, C toElement, boolean toInclusive)
Implements abstract com. |
| public ContiguousSet | tailSet(C
low endpoint (inclusive) of the returned set fromElement)Overrides com. Implements java. fromElement.
|
| public ContiguousSet | tailSet(C
low endpoint of the returned set fromElement, boolean true if the low endpoint
is to be included in the returned viewOverrides com. Implements java. inclusive is true) fromElement.
|
| pack-priv abstract ContiguousSet | tailSetImpl(C fromElement, boolean inclusive)
Implements abstract com. |
| public String | toString()
Overrides java. "[1..100]".
|
| pack-priv Object |
| domain | back to summary |
|---|---|
| pack-priv final DiscreteDomain<C> domain | |
| ContiguousSet | back to summary |
|---|---|
| pack-priv ContiguousSet(DiscreteDomain<C> domain) | |
| builder | back to summary |
|---|---|
| public static <E> ImmutableSortedSet. Hides com. Deprecated Use Not supported.
| |
| closed | back to summary |
|---|---|
| public static ContiguousSet Returns a nonempty contiguous set containing all
| |
| closed | back to summary |
|---|---|
| public static ContiguousSet Returns a nonempty contiguous set containing all
| |
| closedOpen | back to summary |
|---|---|
| public static ContiguousSet Returns a contiguous set containing all
| |
| closedOpen | back to summary |
|---|---|
| public static ContiguousSet Returns a contiguous set containing all
| |
| create | back to summary |
|---|---|
| public static <C extends Comparable Returns a
| |
| createDescendingSet | back to summary |
|---|---|
| pack-priv ImmutableSortedSet Implements abstract com.
| |
| headSet | back to summary |
|---|---|
| public ContiguousSet Overrides com. Implements java. Doc from com. Returns a view of the portion of this set whose elements are
strictly less than The returned set will throw an Equivalent to This method returns a serializable The
| |
| headSet | back to summary |
|---|---|
| public ContiguousSet Overrides com. Implements java. Doc from java. Returns a view of the portion of this set whose elements are less than
(or equal to, if The returned set will throw an
| |
| headSetImpl | back to summary |
|---|---|
| pack-priv abstract ContiguousSet Implements abstract com.
| |
| intersection | back to summary |
|---|---|
| public abstract ContiguousSet Returns the set of values that are contained in both this set and the other. This method should always be used instead of | |
| range | back to summary |
|---|---|
| public abstract Range Returns a range, closed on both ends, whose endpoints are the minimum and maximum values
contained in this set. This is equivalent to
| |
| range | back to summary |
|---|---|
| public abstract Range Returns the minimal range with the given boundary types for which all values in this set are contained within the range. Note that this method will return ranges with unbounded endpoints if
| |
| subSet | back to summary |
|---|---|
| public ContiguousSet Overrides com. Implements java. Doc from com. Returns a view of the portion of this set whose elements range
from The returned set will throw an Equivalent to This method returns a serializable The
| |
| subSet | back to summary |
|---|---|
| public ContiguousSet Overrides com. Implements java. Doc from java. Returns a view of the portion of this set whose elements range from
The returned set will throw an
| |
| subSetImpl | back to summary |
|---|---|
| pack-priv abstract ContiguousSet Implements abstract com.
| |
| tailSet | back to summary |
|---|---|
| public ContiguousSet Overrides com. Implements java. Doc from com. Returns a view of the portion of this set whose elements are
greater than or equal to The returned set will throw an Equivalent to This method returns a serializable The
| |
| tailSet | back to summary |
|---|---|
| public ContiguousSet Overrides com. Implements java. Doc from java. Returns a view of the portion of this set whose elements are greater
than (or equal to, if The returned set will throw an
| |
| tailSetImpl | back to summary |
|---|---|
| pack-priv abstract ContiguousSet Implements abstract com.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a shorthand representation of the contents such as
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() Overrides com.
| |