java.util
Class TreeMap.SubMap.EntrySetView
java.lang.Object
java.util.AbstractCollection
java.util.AbstractSet
java.util.TreeMap.SubMap.EntrySetView
- All Implemented Interfaces:
- Collection, Set
- Enclosing class:
- TreeMap.SubMap
- private class TreeMap.SubMap.EntrySetView
- extends AbstractSet
Method Summary |
boolean |
contains(Object o)
Returns true if this set contains the specified element. |
boolean |
isEmpty()
Returns true if this set contains no elements. |
Iterator |
iterator()
Returns an iterator over the elements in this set. |
boolean |
remove(Object o)
Removes the specified element from this set if it is present (optional
operation). |
int |
size()
Returns the number of elements in this set (its cardinality). |
size
private transient int size
sizeModCount
private transient int sizeModCount
TreeMap.SubMap.EntrySetView
private TreeMap.SubMap.EntrySetView()
size
public int size()
- Description copied from interface:
Set
- Returns the number of elements in this set (its cardinality). If this
set contains more than Integer.MAX_VALUE elements, returns
Integer.MAX_VALUE.
- Specified by:
size
in interface Set
- Specified by:
size
in class AbstractCollection
- Returns:
- the number of elements in this collection.
isEmpty
public boolean isEmpty()
- Description copied from interface:
Set
- Returns true if this set contains no elements.
- Specified by:
isEmpty
in interface Set
- Overrides:
isEmpty
in class AbstractCollection
- Returns:
- true if this collection contains no elements.
contains
public boolean contains(Object o)
- Description copied from interface:
Set
- 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 (o==null ? e==null :
o.equals(e))
.
- Specified by:
contains
in interface Set
- Overrides:
contains
in class AbstractCollection
- Parameters:
o
- object to be checked for containment in this collection.
- Returns:
- true if this collection contains the specified element.
remove
public boolean remove(Object o)
- Description copied from interface:
Set
- Removes the specified element from this set if it is present (optional
operation). More formally, removes an element
e
such that
(o==null ? e==null : o.equals(e))
, if the set contains
such an element. Returns true if the set contained the
specified element (or equivalently, if the set changed as a result of
the call). (The set will not contain the specified element once the
call returns.)
- Specified by:
remove
in interface Set
- Overrides:
remove
in class AbstractCollection
- Parameters:
o
- element to be removed from this collection, if present.
- Returns:
- true if the collection contained the specified
element.
iterator
public Iterator iterator()
- Description copied from interface:
Set
- Returns an iterator over the elements in this set. The elements are
returned in no particular order (unless this set is an instance of some
class that provides a guarantee).
- Specified by:
iterator
in interface Set
- Specified by:
iterator
in class AbstractCollection
- Returns:
- an iterator over the elements contained in this collection.