public abstract class AbstractKeyList extends Object implements Key
The GNU Lesser General Public License for details.
,
Serialized FormModifier and Type | Class and Description |
---|---|
(package private) static class |
AbstractKeyList.NameVisitor
The
NameVisitor constructs a readable representation of the
Passage. |
(package private) static class |
AbstractKeyList.OsisIDVisitor
The
OsisRefVisitor constructs a readable representation of
the Passage, using OSIS names. |
(package private) static class |
AbstractKeyList.OsisRefVisitor
The
OsisRefVisitor constructs a readable representation of
the Passage, using OSIS names. |
Modifier and Type | Field and Description |
---|---|
private String |
name
The common user visible name for this work
|
private static long |
serialVersionUID
Serialization ID
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractKeyList(String name)
Build an AbstractKeyList with the given name.
|
Modifier and Type | Method and Description |
---|---|
AbstractKeyList |
clone()
This needs to be declared here so that it is visible as a method on a
derived Key.
|
int |
compareTo(Key that) |
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.
|
String |
getName()
A Human readable version of the Key.
|
String |
getName(Key base)
Translate the Key into a human readable string, with the assumption that
the specified Key has just been output, so if we are in the same region,
we do not need to display the region name, and so on.
|
String |
getOsisID()
The OSIS defined id specification for this Key.
|
String |
getOsisRef()
The OSIS defined reference specification for this Key.
|
String |
getRootName()
A Human readable version of the Key's top level name.
|
int |
hashCode()
This needs to be declared here so that it is visible as a method on a
derived Key.
|
boolean |
isEmpty()
Does this Key have 0 members
|
protected static void |
retain(Key alter,
Key base)
Utility to remove all the keys from alter that are not in base
|
void |
retainAll(Key key)
Removes all but the specified element from this set.
|
void |
setName(String name)
Override the default name with a custom name.
|
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, blur, canHaveChildren, clear, get, getCardinality, getChildCount, getParent, indexOf, removeAll
private String name
private static final long serialVersionUID
protected AbstractKeyList(String name)
name
- public boolean isEmpty()
Key
public boolean contains(Key key)
Key
public void retainAll(Key key)
Key
protected static void retain(Key alter, Key base)
alter
- The key to remove keys frombase
- The check keypublic void setName(String name)
name
- public String getName()
Key
public String getName(Key base)
Key
public String getRootName()
Key
getRootName
in interface Key
public String getOsisRef()
Key
getOsisRef
in interface Key
public String getOsisID()
Key
public boolean equals(Object obj)
Key
public int hashCode()
Key
public int compareTo(Key that)
compareTo
in interface Comparable<Key>