public class SetKeyList extends AbstractKeyList
The GNU Lesser General Public License for details.,
Serialized FormAbstractKeyList.NameVisitor, AbstractKeyList.OsisIDVisitor, AbstractKeyList.OsisRefVisitor| Modifier and Type | Field and Description |
|---|---|
private List<Key> |
list
The Set that we are proxying to
|
private static org.slf4j.Logger |
log
The log stream
|
private Key |
parent
The parent of this key
|
private static long |
serialVersionUID
Serialization ID
|
| Constructor and Description |
|---|
SetKeyList(Set<Key> set)
Simple ctor
|
SetKeyList(Set<Key> set,
Key parent)
Simple ctor
|
SetKeyList(Set<Key> set,
Key parent,
String name)
Simple ctor
|
SetKeyList(Set<Key> set,
String name)
Simple ctor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAll(Key key)
Adds the specified element to this set if it is not already present.
|
void |
blur(int by,
RestrictionType restrict)
Widen the range of the verses/keys in this list.
|
boolean |
canHaveChildren()
Returns false if the receiver is a leaf node and can not have children.
|
void |
clear()
Removes all of the elements from this set (optional operation).
|
boolean |
contains(Key key)
Returns true if this set contains the specified element.
|
boolean |
equals(Object obj)
This needs to be declared here so that it is visible as a method on a
derived Key.
|
Key |
get(int index)
Gets a key from a specific point in this list of children.
|
int |
getCardinality()
Returns the number of elements in this set (its cardinality).
|
int |
getChildCount()
Returns the number of children that this node has.
|
Key |
getParent()
All keys have parents unless they are the root of a Key.
|
int |
hashCode()
This needs to be declared here so that it is visible as a method on a
derived Key.
|
int |
indexOf(Key that)
Reverse a Key into the position the key holds in the list of children
|
boolean |
isEmpty()
Does this Key have 0 members
|
Iterator<Key> |
iterator() |
void |
removeAll(Key key)
Removes the specified elements from this set if it is present.
|
clone, compareTo, getName, getName, getOsisID, getOsisRef, getRootName, retain, retainAll, setName, toStringprivate Key parent
private static final long serialVersionUID
private static final org.slf4j.Logger log
public void addAll(Key key)
Keykey - element to be added to this set.public void clear()
Keypublic boolean contains(Key key)
Keycontains in interface Keycontains in class AbstractKeyListkey - element whose presence in this set is to be tested.public boolean equals(Object obj)
Keyequals in interface Keyequals in class AbstractKeyListpublic int hashCode()
KeyhashCode in interface KeyhashCode in class AbstractKeyListpublic boolean isEmpty()
KeyisEmpty in interface KeyisEmpty in class AbstractKeyListpublic void removeAll(Key key)
Keykey - object to be removed from this set, if present.public int getCardinality()
KeyThis method is potentially expensive, as it often requires cycling through all the keys in the set.
public boolean canHaveChildren()
Keypublic int getChildCount()
Keypublic Key get(int index)
Keyindex - The index of the Key to retrievepublic int indexOf(Key that)
Keythat - The Key to findpublic Key getParent()
Keypublic void blur(int by,
RestrictionType restrict)
Keyby - The number of verses/keys to widen byrestrict - How should we restrict the blurring?Passage