Constructor and Description |
---|
TableBikeySet()
Constructs a new, empty set
|
TableBikeySet(BikeySet<? extends R,? extends C> bikeySet)
Constructs a new set containing the elements in the specified set.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Bikey<R,C> key)
Adds the specified bikey to this set if it is not already present.
|
boolean |
add(R row,
C column)
Adds the specified pair of element to this set if they are not already
present.
|
void |
clear()
Removes all of the elements from this set.
|
java.lang.Object |
clone()
Returns a shallow copy of this TableBikeySet instance: the
elements themselves are not cloned.
|
java.util.Set<C> |
columnKeySet()
Returns a set of column keys that have one or more values in the
BikeySet.
|
boolean |
contains(java.lang.Object o)
Returns true if this set contains the specified element.
|
boolean |
contains(R row,
C column)
Returns true if this set contains the specified pair of
elements.
|
boolean |
equals(java.lang.Object o) |
void |
forEach(java.util.function.BiConsumer<? super R,? super C> action)
Performs the given action for each pair of element of the set until all
elements have been processed or the action throws an exception.
|
void |
forEach(java.util.function.Consumer<? super Bikey<R,C>> action) |
int |
hashCode() |
java.util.Iterator<Bikey<R,C>> |
iterator()
Returns an iterator over the elements in this set.
|
boolean |
remove(java.lang.Object o)
Removes the specified element from this set if it is present
|
boolean |
remove(R row,
C column)
Removes the specified pair of elements from this set if they are present.
|
java.util.Set<R> |
rowKeySet()
Returns a set of row keys that have one or more values in the
BikeySet.
|
int |
size()
Returns the number of elements in this set (its cardinality).
|
addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator, stream
public TableBikeySet()
public TableBikeySet(BikeySet<? extends R,? extends C> bikeySet)
bikeySet
- the collection whose elements are to be placed into this setjava.lang.NullPointerException
- if the specified collection is nullpublic boolean add(R row, C column)
BikeySet
If this set already contains the element, the call leaves the set unchanged and returns false. This ensures that sets never contain duplicate elements.
public boolean add(Bikey<R,C> key)
BikeySet
If this set already contains the element, the call leaves the set unchanged and returns false. This ensures that sets never contain duplicate elements.
add
in interface BikeySet<R,C>
add
in interface java.util.Collection<Bikey<R,C>>
add
in interface java.util.Set<Bikey<R,C>>
add
in class java.util.AbstractCollection<Bikey<R,C>>
key
- bikey element to be added to this setpublic boolean remove(R row, C column)
BikeySet
If after a removal, one column has no items in any row, its metainfo is not deleted and potentially the set can occupy a lot of space being empty.
public boolean remove(java.lang.Object o)
BikeySet
remove
in interface BikeySet<R,C>
remove
in interface java.util.Collection<Bikey<R,C>>
remove
in interface java.util.Set<Bikey<R,C>>
remove
in class java.util.AbstractCollection<Bikey<R,C>>
o
- object to be removed from this set, if presentpublic java.util.Set<R> rowKeySet()
BikeySet
public java.util.Set<C> columnKeySet()
BikeySet
columnKeySet
in interface BikeySet<R,C>
public boolean contains(R row, C column)
BikeySet
public boolean contains(java.lang.Object o)
BikeySet
contains
in interface BikeySet<R,C>
contains
in interface java.util.Collection<Bikey<R,C>>
contains
in interface java.util.Set<Bikey<R,C>>
contains
in class java.util.AbstractCollection<Bikey<R,C>>
o
- element whose presence in this set is to be testedpublic void forEach(java.util.function.BiConsumer<? super R,? super C> action)
BikeySet
public java.util.Iterator<Bikey<R,C>> iterator()
iterator
in interface java.lang.Iterable<Bikey<R,C>>
iterator
in interface java.util.Collection<Bikey<R,C>>
iterator
in interface java.util.Set<Bikey<R,C>>
iterator
in class java.util.AbstractCollection<Bikey<R,C>>
public int size()
public void clear()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object o)