Top Description Inners Fields Constructors Methods
com.google.common.collect

pack-priv final Class EmptyContiguousSet<C extends java.lang.Comparable<T>>

extends ContiguousSet<C extends Comparable<T>>
Class Inheritance
Annotations
@GwtCompatible
emulated:true
@SuppressWarnings:rawtypes
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtCompatible, .GwtIncompatible, .J2ktIncompatible, java.io.InvalidObjectException, .ObjectInputStream, .Serializable, java.util.NoSuchElementException, .Set, javax.annotation.CheckForNull

An empty contiguous set.
Author
Gregory Kick

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Inherited from com.google.common.collect.ContiguousSet:
domain

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ImmutableList<C>
asList()

Overrides com.google.common.collect.ImmutableSet.CachingAsList.asList.

Returns an ImmutableList containing the same elements, in the same order, as this collection.
public boolean
contains(Object
element whose presence in this set is to be tested
object
)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Returns true if this set contains the specified element.
pack-priv ImmutableSortedSet<C>
public UnmodifiableIterator<C>
descendingIterator()

Implements abstract com.google.common.collect.ImmutableSortedSet.descendingIterator.

Implements java.util.NavigableSet.descendingIterator.

Returns an iterator over the elements in this set, in descending order.
public boolean
equals(Object
object to be compared for equality with this set
object
)

Overrides com.google.common.collect.ImmutableSet.equals.

Implements java.util.Set.equals, java.util.Collection.equals.

Compares the specified object with this set for equality.
public C
first()

Overrides com.google.common.collect.ImmutableSortedSet.first.

Implements java.util.SortedSet.first.

Returns the first (lowest) element currently in this set.
public int
hashCode()

Overrides com.google.common.collect.ImmutableSet.hashCode.

Implements java.util.Set.hashCode, java.util.Collection.hashCode.

Returns the hash code value for this set.
pack-priv ContiguousSet<C>
headSetImpl(C toElement, boolean inclusive)

Implements abstract com.google.common.collect.ContiguousSet.headSetImpl.

pack-priv int
indexOf(Object target)

Implements abstract com.google.common.collect.ImmutableSortedSet.indexOf.

Returns the position of an element within the set, or -1 if not present.
public ContiguousSet<C>
intersection(ContiguousSet<C> other)

Implements abstract com.google.common.collect.ContiguousSet.intersection.

Returns the set of values that are contained in both this set and the other.
public boolean
isEmpty()

Overrides java.util.AbstractCollection.isEmpty.

Implements java.util.Set.isEmpty, java.util.Collection.isEmpty.

Returns true if this set contains no elements.
pack-priv boolean
isHashCodeFast()

Overrides com.google.common.collect.ImmutableSet.isHashCodeFast.

Returns true if the hashCode() method runs quickly.
pack-priv boolean
isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.
public UnmodifiableIterator<C>
public C
last()

Overrides com.google.common.collect.ImmutableSortedSet.last.

Implements java.util.SortedSet.last.

Returns the last (highest) element currently in this set.
public Range<C>
range()

Implements abstract com.google.common.collect.ContiguousSet.range.

Returns a range, closed on both ends, whose endpoints are the minimum and maximum values contained in this set.
public Range<C>
range(BoundType lowerBoundType, BoundType upperBoundType)

Implements abstract com.google.common.collect.ContiguousSet.range.

Returns the minimal range with the given boundary types for which all values in this set are contained within the range.
private void
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Returns the number of elements in this set (its cardinality).
pack-priv ContiguousSet<C>
subSetImpl(C fromElement, boolean fromInclusive, C toElement, boolean toInclusive)

Implements abstract com.google.common.collect.ContiguousSet.subSetImpl.

pack-priv ContiguousSet<C>
tailSetImpl(C fromElement, boolean fromInclusive)

Implements abstract com.google.common.collect.ContiguousSet.tailSetImpl.

public String
toString()

Overrides com.google.common.collect.ContiguousSet.toString.

Returns a shorthand representation of the contents such as "[1..100]".
pack-priv Object
Inherited from com.google.common.collect.ContiguousSet:
builderclosedclosedclosedOpenclosedOpencreateheadSetheadSetsubSetsubSettailSettailSet

Constructor Detail

EmptyContiguousSetback to summary
pack-priv EmptyContiguousSet(DiscreteDomain<C> domain)

Method Detail

asListback to summary
public ImmutableList<C> asList()

Overrides com.google.common.collect.ImmutableSet.CachingAsList.asList.

Doc from com.google.common.collect.ImmutableCollection.asList.

Returns an ImmutableList containing the same elements, in the same order, as this collection.

Performance note: in most cases this method can return quickly without actually copying anything. The exact circumstances under which the copy is performed are undefined and subject to change.

Annotations
@Override
containsback to summary
public boolean contains(Object object)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Doc from java.util.Set.contains.

Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that Objects.equals(o, e).

Parameters
object:Object

element whose presence in this set is to be tested

Returns:boolean

true if this set contains the specified element

Annotations
@Override
createDescendingSetback to summary
pack-priv ImmutableSortedSet<C> createDescendingSet()

Overrides com.google.common.collect.ContiguousSet.createDescendingSet.

Annotations
@GwtIncompatible
@Override
descendingIteratorback to summary
public UnmodifiableIterator<C> descendingIterator()

Implements abstract com.google.common.collect.ImmutableSortedSet.descendingIterator.

Implements java.util.NavigableSet.descendingIterator.

Doc from java.util.NavigableSet.descendingIterator.

Returns an iterator over the elements in this set, in descending order. Equivalent in effect to descendingSet().iterator().

Returns:UnmodifiableIterator<C>

an iterator over the elements in this set, in descending order

Annotations
@GwtIncompatible
@Override
equalsback to summary
public boolean equals(Object object)

Overrides com.google.common.collect.ImmutableSet.equals.

Implements java.util.Set.equals, java.util.Collection.equals.

Doc from java.util.Set.equals.

Compares the specified object with this set for equality. Returns true if the specified object is also a set, the two sets have the same size, and every member of the specified set is contained in this set (or equivalently, every member of this set is contained in the specified set). This definition ensures that the equals method works properly across different implementations of the set interface.

Parameters
object:Object

object to be compared for equality with this set

Returns:boolean

true if the specified object is equal to this set

Annotations
@Override
firstback to summary
public C first()

Overrides com.google.common.collect.ImmutableSortedSet.first.

Implements java.util.SortedSet.first.

Doc from java.util.SortedSet.first.

Returns the first (lowest) element currently in this set.

Returns:C

the first (lowest) element currently in this set

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides com.google.common.collect.ImmutableSet.hashCode.

Implements java.util.Set.hashCode, java.util.Collection.hashCode.

Doc from java.util.Set.hashCode.

Returns the hash code value for this set. The hash code of a set is defined to be the sum of the hash codes of the elements in the set, where the hash code of a null element is defined to be zero. This ensures that s1.equals(s2) implies that s1.hashCode()==s2.hashCode() for any two sets s1 and s2, as required by the general contract of Object#hashCode.

Returns:int

the hash code value for this set

Annotations
@Override
headSetImplback to summary
pack-priv ContiguousSet<C> headSetImpl(C toElement, boolean inclusive)

Implements abstract com.google.common.collect.ContiguousSet.headSetImpl.

Annotations
@Override
indexOfback to summary
pack-priv int indexOf(Object target)

Implements abstract com.google.common.collect.ImmutableSortedSet.indexOf.

Doc from com.google.common.collect.ImmutableSortedSet.indexOf.

Returns the position of an element within the set, or -1 if not present.

Annotations
@GwtIncompatible
@Override
intersectionback to summary
public ContiguousSet<C> intersection(ContiguousSet<C> other)

Implements abstract com.google.common.collect.ContiguousSet.intersection.

Doc from com.google.common.collect.ContiguousSet.intersection.

Returns the set of values that are contained in both this set and the other.

This method should always be used instead of Sets#intersection for ContiguousSet instances.

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Overrides java.util.AbstractCollection.isEmpty.

Implements java.util.Set.isEmpty, java.util.Collection.isEmpty.

Doc from java.util.Set.isEmpty.

Returns true if this set contains no elements.

Returns:boolean

true if this set contains no elements

Annotations
@Override
isHashCodeFastback to summary
pack-priv boolean isHashCodeFast()

Overrides com.google.common.collect.ImmutableSet.isHashCodeFast.

Doc from com.google.common.collect.ImmutableSet.isHashCodeFast.

Returns true if the hashCode() method runs quickly.

Annotations
@GwtIncompatible
@Override
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Doc from com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods. This is generally used to determine whether copyOf implementations should make an explicit copy to avoid memory leaks.

Annotations
@Override
iteratorback to summary
public UnmodifiableIterator<C> iterator()

Implements abstract com.google.common.collect.ImmutableSortedSet.iterator.

Implements java.util.NavigableSet.iterator, com.google.common.collect.SortedIterable.iterator, java.util.Set.iterator, java.util.Collection.iterator.

Doc from java.util.NavigableSet.iterator.

Returns an iterator over the elements in this set, in ascending order.

Returns:UnmodifiableIterator<C>

an iterator over the elements in this set, in ascending order

Annotations
@Override
lastback to summary
public C last()

Overrides com.google.common.collect.ImmutableSortedSet.last.

Implements java.util.SortedSet.last.

Doc from java.util.SortedSet.last.

Returns the last (highest) element currently in this set.

Returns:C

the last (highest) element currently in this set

Annotations
@Override
rangeback to summary
public Range<C> range()

Implements abstract com.google.common.collect.ContiguousSet.range.

Doc from com.google.common.collect.ContiguousSet.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(CLOSED, CLOSED).

Annotations
@Override
rangeback to summary
public Range<C> range(BoundType lowerBoundType, BoundType upperBoundType)

Implements abstract com.google.common.collect.ContiguousSet.range.

Doc from com.google.common.collect.ContiguousSet.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 BoundType#OPEN is requested for a domain minimum or maximum. For example, if set was created from the range [1..Integer.MAX_VALUE] then set.range(CLOSED, OPEN) must return [1..∞).

Annotations
@Override
readObjectback to summary
private void readObject(ObjectInputStream stream) throws InvalidObjectException

Hides com.google.common.collect.ImmutableSortedSet.readObject.

Annotations
@GwtIncompatible
@J2ktIncompatible
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Doc from java.util.Set.size.

Returns the number of elements in this set (its cardinality). If this set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this set (its cardinality)

Annotations
@Override
subSetImplback to summary
pack-priv ContiguousSet<C> subSetImpl(C fromElement, boolean fromInclusive, C toElement, boolean toInclusive)

Implements abstract com.google.common.collect.ContiguousSet.subSetImpl.

Annotations
@Override
tailSetImplback to summary
pack-priv ContiguousSet<C> tailSetImpl(C fromElement, boolean fromInclusive)

Implements abstract com.google.common.collect.ContiguousSet.tailSetImpl.

Annotations
@Override
toStringback to summary
public String toString()

Overrides com.google.common.collect.ContiguousSet.toString.

Doc from com.google.common.collect.ContiguousSet.toString.

Returns a shorthand representation of the contents such as "[1..100]".

Returns:String

Doc from java.util.AbstractCollection.toString.

a string representation of this collection

Annotations
@Override
writeReplaceback to summary
pack-priv Object writeReplace()

Overrides com.google.common.collect.ImmutableSortedSet.writeReplace.

Annotations
@GwtIncompatible
@J2ktIncompatible
@Override
com.google.common.collect back to summary

private final Class EmptyContiguousSet.SerializedForm<C extends java.lang.Comparable<T>>

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@GwtIncompatible
@J2ktIncompatible

Field Summary

Modifier and TypeField and Description
private final DiscreteDomain<C>
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

domainback to summary
private final DiscreteDomain<C> domain
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

SerializedFormback to summary
private SerializedForm(DiscreteDomain<C> domain)

Method Detail

readResolveback to summary
private Object readResolve()