|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Key
A Key is a Key that can contain other Keys. The interface is modelled on the java.util.Set interface customized because KeyLists can only store other Keys and simplified by making add() and remove() return void and not a boolean.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence
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). |
boolean |
contains(Key key)
Returns true if this set contains the specified element. |
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 |
getOSISName()
The OSIS defined specification for this Passage. |
Key |
getParent()
All keys have parents unless they are the root of a Key. |
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. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
String getName()
String getOSISName()
Key getParent()
boolean canHaveChildren()
int getChildCount()
boolean isEmpty()
boolean contains(Key key)
key
- element whose presence in this set is to be tested.
Iterator iterator()
void addAll(Key key)
key
- element to be added to this set.
NullPointerException
- if the specified element is nullvoid removeAll(Key key)
key
- object to be removed from this set, if present.
NullPointerException
- if the specified element is nullvoid retainAll(Key key)
key
- object to be left in this set.
NullPointerException
- if the specified element is nullvoid clear()
Key get(int index)
index
- The index of the Key to retrieve
int indexOf(Key that)
that
- The Key to find
void blur(int by, RestrictionType restrict)
by
- The number of verses/keys to widen byrestrict
- How should we restrict the blurring?Passage
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |