public class RocketPassage extends BitwisePassage
The GNU Lesser General Public License for details.,
Serialized FormAbstractPassage.VerseRangeIterator| Modifier and Type | Field and Description |
|---|---|
private DistinctPassage |
distinct
The contained DistinctPassage
|
private RangedPassage |
ranged
The contained RangedPassage
|
private static long |
serialVersionUID
Serialization ID
|
storeBITWISE, DISTINCT, listeners, METHOD_COUNT, originalName, RANGED, REF_ALLOWED_DELIMS, REF_OSIS_DELIM, REF_PREF_DELIM, skipNormalization, suppressEvents| Modifier | Constructor and Description |
|---|---|
|
RocketPassage(Versification v11n)
Create a new RocketPassage
|
protected |
RocketPassage(Versification v11n,
String refs)
Create a Verse from a human readable string.
|
protected |
RocketPassage(Versification v11n,
String refs,
Key basis)
Create a Verse from a human readable string.
|
| Modifier and Type | Method and Description |
|---|---|
int |
booksInPassage()
How many books are there in this Passage
|
boolean |
containsAll(Passage that)
Returns true if this Passage contains all of the verses in that Passage
|
int |
countRanges(RestrictionType restrict)
Like countVerses() that counts VerseRanges instead of Verses Returns the
number of fragments in this collection.
|
int |
countVerses()
Returns the number of verses in this collection.
|
VerseRange |
getRangeAt(int offset,
RestrictionType restrict)
Get a specific VerseRange from this collection
|
Verse |
getVerseAt(int offset)
Get a specific Verse from this collection
|
boolean |
isEmpty()
Does this Key have 0 members
|
Iterator<Key> |
iterator() |
void |
optimizeReads()
For performance reasons we may well want to hint to the Passage that we
have done editing it for now and that it is safe to cache certain values
to speed up future reads.
|
protected void |
optimizeWrites()
Simple method to instruct children to stop caching results
|
Iterator<VerseRange> |
rangeIterator(RestrictionType restrict)
Like iterator() that iterates over VerseRanges instead of Verses.
|
private void |
readObject(ObjectInputStream is)
Serialization support
|
add, addAll, addVersifiedOrdinal, blur, clear, clone, contains, remove, removeAll, retainAlladdPassageListener, addVerses, canHaveChildren, compareTo, equals, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, get, getCardinality, getChildCount, getName, getName, getOsisID, getOsisRef, getOverview, getParent, getRootName, getVersification, getWhole, hashCode, hasRanges, indexOf, isWhole, lowerEventSuppressionAndTest, lowerNormalizeProtection, normalize, raiseEventSuppresion, raiseNormalizeProtection, readDescription, readObjectSupport, removePassageListener, reversify, setParent, toString, toVerseRange, trimRanges, trimVerses, writeDescription, writeObjectSupportprivate transient DistinctPassage distinct
private transient RangedPassage ranged
private static final long serialVersionUID
public RocketPassage(Versification v11n)
v11n - The Versification to which this Passage belongs.protected RocketPassage(Versification v11n, String refs, Key basis) throws NoSuchVerseException
RangedPassage v2 = new RangedPassage(v1.getName()); Then
v1.equals(v2); Theoretically, since there are many ways of
representing a RangedPassage as text string comparison along the lines
of: v1.getName().equals(v2.getName()) could be false.
However since getName() is standardized this will be true. 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 RangedPassagebasis - The basis by which to interpret refsNoSuchVerseException - if refs is invalidprotected RocketPassage(Versification v11n, String refs) throws NoSuchVerseException
RangedPassage v2 = new RangedPassage(v1.getName()); Then
v1.equals(v2); Theoretically, since there are many ways of
representing a RangedPassage as text string comparison along the lines
of: v1.getName().equals(v2.getName()) could be false.
However since getName() is standardized this will be true. 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 RangedPassageNoSuchVerseException - if refs is invalidpublic void optimizeReads()
PassageoptimizeReads in interface PassageoptimizeReads in class AbstractPassageprotected void optimizeWrites()
AbstractPassageoptimizeWrites in class AbstractPassagepublic int countRanges(RestrictionType restrict)
PassagecountRanges in interface PassagecountRanges in class AbstractPassagerestrict - Do we break ranges at chapter/book boundariesVerseRangepublic int countVerses()
PassagecountVerses in interface PassagecountVerses in class BitwisePassageVersepublic Iterator<Key> iterator()
iterator in interface Iterable<Key>iterator in class BitwisePassagepublic Iterator<VerseRange> rangeIterator(RestrictionType restrict)
PassagerangeIterator in interface PassagerangeIterator in class AbstractPassagerestrict - Do we break ranges over chapterspublic boolean isEmpty()
KeyisEmpty in interface KeyisEmpty in class BitwisePassagepublic Verse getVerseAt(int offset) throws ArrayIndexOutOfBoundsException
PassagegetVerseAt in interface PassagegetVerseAt in class AbstractPassageoffset - The verse offset (legal values are 0 to countVerses()-1)ArrayIndexOutOfBoundsException - If the offset is out of rangepublic VerseRange getRangeAt(int offset, RestrictionType restrict) throws ArrayIndexOutOfBoundsException
PassagegetRangeAt in interface PassagegetRangeAt in class AbstractPassageoffset - The verse range offset (legal values are 0 to countRanges()-1)restrict - Do we break ranges at chapter/book boundariesArrayIndexOutOfBoundsException - If the offset is out of rangepublic int booksInPassage()
PassagebooksInPassage in interface PassagebooksInPassage in class AbstractPassagepublic boolean containsAll(Passage that)
PassagecontainsAll in interface PassagecontainsAll in class AbstractPassagethat - Passage to be checked for containment in this collection.private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
is - The stream to read our state fromIOException - if the read failsClassNotFoundException - If the read data is incorrect