public static class AddressTrieMap.EntrySet<K extends Address,V> extends AbstractSet<Map.Entry<K,V>> implements Serializable
| Modifier and Type | Method and Description |
|---|---|
Iterator<Map.Entry<K,V>> |
blockSizeIterator()
Iterates from largest prefix blocks to smallest to individual addresses.
|
void |
clear()
Removes all of the elements from this collection (optional operation).
|
Iterator<Map.Entry<K,V>> |
containedFirstIterator()
Returns an iterator that visits contained addresses and subnet blocks before their containing subnet blocks.
|
Iterator<Map.Entry<K,V>> |
containingFirstIterator()
Returns an iterator that visits containing subnet blocks before their contained addresses and subnet blocks.
|
boolean |
contains(Object o)
Returns true if this collection contains the specified element.
|
boolean |
equals(Object o)
Compares the specified object with this set for equality.
|
int |
hashCode()
Returns the hash code value for this set.
|
boolean |
isEmpty()
Returns true if this collection contains no elements.
|
Iterator<Map.Entry<K,V>> |
iterator()
Returns an iterator over the elements contained in this collection.
|
boolean |
remove(Object o)
Removes a single instance of the specified element from this
collection, if it is present (optional operation).
|
boolean |
removeAll(Collection<?> collection)
Removes from this set all of its elements that are contained in the
specified collection (optional operation).
|
int |
size()
Returns the number of elements in this collection.
|
Spliterator<Map.Entry<K,V>> |
spliterator()
Creates a
Spliterator over the elements in this set. |
add, addAll, containsAll, retainAll, toArray, toArray, toStringadd, addAll, containsAll, retainAll, toArray, toArrayparallelStream, removeIf, streampublic Iterator<Map.Entry<K,V>> iterator()
java.util.AbstractCollectioniterator in interface Iterable<Map.Entry<K extends Address,V>>iterator in interface Collection<Map.Entry<K extends Address,V>>iterator in interface Set<Map.Entry<K extends Address,V>>iterator in class AbstractCollection<Map.Entry<K extends Address,V>>public Iterator<Map.Entry<K,V>> containingFirstIterator()
public Iterator<Map.Entry<K,V>> containedFirstIterator()
public Iterator<Map.Entry<K,V>> blockSizeIterator()
public Spliterator<Map.Entry<K,V>> spliterator()
java.util.SetSpliterator over the elements in this set.
The Spliterator reports Spliterator.DISTINCT.
Implementations should document the reporting of additional
characteristic values.
spliterator in interface Iterable<Map.Entry<K extends Address,V>>spliterator in interface Collection<Map.Entry<K extends Address,V>>spliterator in interface Set<Map.Entry<K extends Address,V>>Spliterator over the elements in this setpublic int size()
java.util.Collectionpublic boolean isEmpty()
java.util.AbstractCollectionThis implementation returns size() == 0.
public boolean contains(Object o)
java.util.AbstractCollectionThis implementation iterates over the elements in the collection, checking each element in turn for equality with the specified element.
contains in interface Collection<Map.Entry<K extends Address,V>>contains in interface Set<Map.Entry<K extends Address,V>>contains in class AbstractCollection<Map.Entry<K extends Address,V>>o - element whose presence in this collection is to be testedpublic boolean remove(Object o)
java.util.AbstractCollectionThis implementation iterates over the collection looking for the specified element. If it finds the element, it removes the element from the collection using the iterator's remove method.
Note that this implementation throws an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method and this collection contains the specified object.
remove in interface Collection<Map.Entry<K extends Address,V>>remove in interface Set<Map.Entry<K extends Address,V>>remove in class AbstractCollection<Map.Entry<K extends Address,V>>o - element to be removed from this collection, if presentpublic void clear()
java.util.AbstractCollectionThis implementation iterates over this collection, removing each element using the Iterator.remove operation. Most implementations will probably choose to override this method for efficiency.
Note that this implementation will throw an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method and this collection is non-empty.
public int hashCode()
java.util.AbstractSetObject.hashCode().
This implementation iterates over the set, calling the hashCode method on each element in the set, and adding up the results.
hashCode in interface Collection<Map.Entry<K extends Address,V>>hashCode in interface Set<Map.Entry<K extends Address,V>>hashCode in class AbstractSet<Map.Entry<K extends Address,V>>Object.equals(Object),
Set.equals(Object)public boolean equals(Object o)
java.util.AbstractSetThis implementation first checks if the specified object is this set; if so it returns true. Then, it checks if the specified object is a set whose size is identical to the size of this set; if not, it returns false. If so, it returns containsAll((Collection) o).
equals in interface Collection<Map.Entry<K extends Address,V>>equals in interface Set<Map.Entry<K extends Address,V>>equals in class AbstractSet<Map.Entry<K extends Address,V>>o - object to be compared for equality with this setObject.hashCode(),
HashMappublic boolean removeAll(Collection<?> collection)
java.util.AbstractSetThis implementation determines which is the smaller of this set and the specified collection, by invoking the size method on each. If this set has fewer elements, then the implementation iterates over this set, checking each element returned by the iterator in turn to see if it is contained in the specified collection. If it is so contained, it is removed from this set with the iterator's remove method. If the specified collection has fewer elements, then the implementation iterates over the specified collection, removing from this set each element returned by the iterator, using this set's remove method.
Note that this implementation will throw an UnsupportedOperationException if the iterator returned by the iterator method does not implement the remove method.
removeAll in interface Collection<Map.Entry<K extends Address,V>>removeAll in interface Set<Map.Entry<K extends Address,V>>removeAll in class AbstractSet<Map.Entry<K extends Address,V>>collection - collection containing elements to be removed from this setAbstractCollection.remove(Object),
AbstractCollection.contains(Object)