public class DistinctPassage extends AbstractPassage
The GNU Lesser General Public License for details.
,
Serialized FormAbstractPassage.VerseRangeIterator
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
To make serialization work across new versions
|
private SortedSet<Key> |
store
The place the real data is stored
|
BITWISE, DISTINCT, listeners, METHOD_COUNT, originalName, RANGED, REF_ALLOWED_DELIMS, REF_OSIS_DELIM, REF_PREF_DELIM, skipNormalization, suppressEvents
Modifier | Constructor and Description |
---|---|
|
DistinctPassage(Versification v11n)
Create an empty DistinctPassage.
|
protected |
DistinctPassage(Versification v11n,
String refs) |
protected |
DistinctPassage(Versification v11n,
String refs,
Key basis)
Create a Verse from a human readable string.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Key obj)
Add this Verse/VerseRange to this Passage
|
void |
clear()
Removes all of the elements from this set (optional operation).
|
DistinctPassage |
clone()
Get a copy of ourselves.
|
boolean |
contains(Key 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 Key have 0 members
|
Iterator<Key> |
iterator() |
private void |
readObject(ObjectInputStream in)
Call the support mechanism in AbstractPassage
|
void |
remove(Key obj)
Remove this Verse/VerseRange from this Passage
|
private void |
writeObject(ObjectOutputStream out)
Call the support mechanism in AbstractPassage
|
addAll, addPassageListener, addVerses, blur, booksInPassage, canHaveChildren, compareTo, containsAll, countRanges, equals, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, get, getCardinality, getChildCount, getName, getName, getOsisID, getOsisRef, getOverview, getParent, getRangeAt, getRootName, getVerseAt, getVersification, getWhole, hashCode, hasRanges, indexOf, isWhole, lowerEventSuppressionAndTest, lowerNormalizeProtection, normalize, optimizeReads, optimizeWrites, raiseEventSuppresion, raiseNormalizeProtection, rangeIterator, readDescription, readObjectSupport, removeAll, removePassageListener, retainAll, reversify, setParent, toString, toVerseRange, trimRanges, trimVerses, writeDescription, writeObjectSupport
private static final long serialVersionUID
public DistinctPassage(Versification v11n)
DistinctPassage().add(...);
v11n
- The Versification to which this Passage belongs.protected DistinctPassage(Versification v11n, String refs, Key basis) 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 comparison 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.v11n
- The Versification to which this Passage belongs.refs
- A String containing the text of the DistinctPassagebasis
- The basis by which to interpret refsNoSuchVerseException
- If the string is not validprotected DistinctPassage(Versification v11n, String refs) throws NoSuchVerseException
NoSuchVerseException
public DistinctPassage clone()
clone
in interface Key
clone
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(Key obj)
Passage
public void add(Key obj)
Passage
obj
- The Verses to be added from this Passagepublic void remove(Key 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 toIOException
- if the read failsAbstractPassage.writeObjectSupport(ObjectOutputStream)
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
in
- The stream to read our state fromIOException
- if the read failsClassNotFoundException
- If the read data is incorrectAbstractPassage.readObjectSupport(ObjectInputStream)