|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.passage.AbstractPassage
org.crosswire.jsword.passage.DistinctPassage
public class DistinctPassage
A Passage that is implemented using a TreeSet of Verses. The attributes of the style are:
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
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.crosswire.jsword.passage.AbstractPassage |
---|
AbstractPassage.VerseRangeIterator |
Field Summary | |
---|---|
(package private) static long |
serialVersionUID
To make serialization work across new versions |
private SortedSet |
store
The place the real data is stored |
Fields inherited from class org.crosswire.jsword.passage.AbstractPassage |
---|
BITWISE, DISTINCT, listeners, METHOD_COUNT, originalName, RANGED, REF_ALLOWED_DELIMS, REF_OSIS_DELIM, REF_PREF_DELIM, skipNormalization, suppressEvents |
Constructor Summary | |
---|---|
protected |
DistinctPassage()
Create an empty DistinctPassage. |
protected |
DistinctPassage(String refs)
Create a Verse from a human readable string. |
Method Summary | |
---|---|
void |
add(VerseBase obj)
Add this Verse/VerseRange to this Passage |
void |
clear()
Removes all of the elements from this set (optional operation). |
Object |
clone()
Get a copy of ourselves. |
boolean |
contains(VerseBase obj)
Returns true if this collection contains all the specified Verse |
int |
countVerses()
Returns the number of verses in this collection. |
boolean |
isEmpty()
Does this Passage have 0 members |
Iterator |
iterator()
|
private void |
readObject(ObjectInputStream in)
Call the support mechanism in AbstractPassage |
void |
remove(VerseBase obj)
Remove this Verse/VerseRange from this Passage |
private void |
writeObject(ObjectOutputStream out)
Call the support mechanism in AbstractPassage |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
private transient SortedSet store
Constructor Detail |
---|
protected DistinctPassage()
DistinctPassage().add(...);
protected DistinctPassage(String refs) throws NoSuchVerseException
DistinctPassage v2 = new DistinctPassage(v1.toString());
Then v1.equals(v2);
Theoretically, since there are many ways of representing a
DistinctPassage as text string comparision along the lines of:
v1.toString().equals(v2.toString())
could be false.
Practically since toString() is standardized this will be true
however. We don't need to worry about thread safety in a ctor since
we don't exist yet.
refs
- A String containing the text of the DistinctPassage
NoSuchVerseException
- If the string is not validMethod Detail |
---|
public Object clone()
clone
in interface Passage
clone
in class AbstractPassage
public Iterator iterator()
iterator
in interface Key
iterator
in class AbstractPassage
public boolean isEmpty()
Key
isEmpty
in interface Key
isEmpty
in class AbstractPassage
public int countVerses()
Passage
countVerses
in interface Passage
countVerses
in class AbstractPassage
Verse
public boolean contains(VerseBase obj)
Passage
obj
- Verse or VerseRange that may exist in this Passage
public void add(VerseBase obj)
Passage
obj
- The Verses to be removed from this Passagepublic void remove(VerseBase obj)
Passage
obj
- The Verses to be removed from this Passagepublic void clear()
Key
clear
in interface Key
clear
in class AbstractPassage
private void writeObject(ObjectOutputStream out) throws IOException
out
- The stream to write our state to
IOException
- if the read failsAbstractPassage.writeObjectSupport(ObjectOutputStream)
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
in
- The stream to read our state from
IOException
- if the read fails
ClassNotFoundException
- If the read data is incorrectAbstractPassage.readObjectSupport(ObjectInputStream)
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |