public interface BikeySet<R,C> extends java.util.Set<Bikey<R,C>>
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.
|
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.
|
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.
|
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.
|
default java.util.Spliterator<Bikey<R,C>> |
spliterator() |
default java.util.stream.Stream<Bikey<R,C>> |
stream()
Returns a sequential
Stream with this collection of pair values
as its source. |
boolean add(R row, C column)
If this set already contains the element, the call leaves the set unchanged and returns false. This ensures that sets never contain duplicate elements.
row
- row element to be added to this setcolumn
- column element to be added to this setjava.lang.NullPointerException
- if one of the specified elements are nullboolean add(Bikey<R,C> key)
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 java.util.Collection<Bikey<R,C>>
add
in interface java.util.Set<Bikey<R,C>>
key
- bikey element to be added to this setjava.lang.NullPointerException
- if the specified elements is nullboolean remove(R row, C column)
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.
row
- row element to be removed from this set, if presentcolumn
- column element to be removed from this set, if presentjava.lang.NullPointerException
- if one of the specified elements are nullboolean remove(java.lang.Object o)
remove
in interface java.util.Collection<Bikey<R,C>>
remove
in interface java.util.Set<Bikey<R,C>>
o
- object to be removed from this set, if presentjava.lang.NullPointerException
- if the specified element is nulljava.util.Set<R> rowKeySet()
java.util.Set<C> columnKeySet()
boolean contains(R row, C column)
row
- row element whose presence in this set is to be testedcolumn
- column element whose presence in this set is to be testedboolean contains(java.lang.Object o)
void forEach(java.util.function.BiConsumer<? super R,? super C> action)
action
- The action to be performed for each elementjava.lang.NullPointerException
- if the specified action is nulldefault java.util.stream.Stream<Bikey<R,C>> stream()
Stream
with this collection of pair values
as its source.