|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.jsword.passage.DefaultLeafKeyList
public class DefaultLeafKeyList
A simple default implementation of the Key interface.
for license details.
The copyright to this program is held by it's authors.| Field Summary | |
|---|---|
private String |
name
The human readable string that this key represents |
private String |
osisName
The OSIS version of this Key |
private Key |
parent
The parent of this key |
| Constructor Summary | |
|---|---|
DefaultLeafKeyList(String name,
String osisName)
Default ctor |
|
DefaultLeafKeyList(String name,
String osisName,
Key parent)
Default ctor |
|
| Method Summary | |
|---|---|
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 true if the receiver is a leaf node and can not have children. |
void |
clear()
Removes all of the elements from this set (optional operation). |
Object |
clone()
This needs to be declared here so that it is visible as a method on a derived Key. |
int |
compareTo(Object obj)
|
boolean |
contains(Key key)
Returns true if this set contains the specified element. |
boolean |
equals(Object obj)
|
Key |
get(int index)
Gets a key from a specific point in this list. |
int |
getChildCount()
Returns the number of elements in this set (its cardinality). |
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. |
Key |
getParent()
All keys have parents unless they are the root of a Key. |
int |
hashCode()
|
int |
indexOf(Key that)
Reverse a Key into the position the key holds in the list |
boolean |
isEmpty()
Does this Passage have 0 members |
Iterator |
iterator()
|
void |
removeAll(Key key)
Removes the specified elements from this set if it is present. |
void |
retainAll(Key key)
Removes all but the specified element from this set. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Key parent
private String name
private String osisName
| Constructor Detail |
|---|
public DefaultLeafKeyList(String name,
String osisName)
public DefaultLeafKeyList(String name,
String osisName,
Key parent)
| Method Detail |
|---|
public boolean canHaveChildren()
Key
canHaveChildren in interface Keypublic String getName()
Key
getName in interface Keypublic String getName(Key base)
Key
getName in interface Keybase - The key to use to cut down unnecessary output.
public String getOsisRef()
Key
getOsisRef in interface Keypublic String getOsisID()
Key
getOsisID in interface Keypublic Key getParent()
Key
getParent in interface Keypublic int getChildCount()
Key
getChildCount in interface Keypublic boolean isEmpty()
Key
isEmpty in interface Keypublic boolean contains(Key key)
Key
contains in interface Keykey - element whose presence in this set is to be tested.
public Iterator iterator()
iterator in interface Iterablepublic void addAll(Key key)
Key
addAll in interface Keykey - element to be added to this set.public void removeAll(Key key)
Key
removeAll in interface Keykey - object to be removed from this set, if present.public void retainAll(Key key)
Key
retainAll in interface Keykey - object to be left in this set.public void clear()
Key
clear in interface Keypublic Key get(int index)
Key
get in interface Keyindex - The index of the Key to retrieve
public int indexOf(Key that)
Key
indexOf in interface Keythat - The Key to find
public void blur(int by,
RestrictionType restrict)
Key
blur in interface Keyby - The number of verses/keys to widen byrestrict - How should we restrict the blurring?Passagepublic String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Object obj)
compareTo in interface Comparablepublic Object clone()
Key
clone in interface Keyclone in class Object
|
Copyright ? 2003-2006 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||