org.crosswire.jsword.book.sword
Class IndexKey

java.lang.Object
  extended by org.crosswire.jsword.passage.DefaultLeafKeyList
      extended by org.crosswire.jsword.book.sword.IndexKey
All Implemented Interfaces:
Serializable, Cloneable, Comparable, Iterable, Key

 class IndexKey
extends DefaultLeafKeyList

A Key that knows where the data is in the real file.

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

Field Summary
private  int offset
           
private static long serialVersionUID
          Serialization ID
private  int size
           
 
Constructor Summary
IndexKey(String text)
          Setup with the key name.
IndexKey(String text, int offset, int size, Key parent)
          Setup with the key name and positions of data in the file
 
Method Summary
 Object clone()
          This needs to be declared here so that it is visible as a method on a derived Key.
 int getOffset()
           
 int getSize()
           
 void setOffset(int newOffset)
           
 void setSize(int newSize)
           
 
Methods inherited from class org.crosswire.jsword.passage.DefaultLeafKeyList
addAll, blur, canHaveChildren, clear, compareTo, contains, equals, get, getCardinality, getChildCount, getName, getName, getOsisID, getOsisRef, getParent, getRootName, hashCode, indexOf, isEmpty, iterator, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

offset

private int offset

size

private int size

serialVersionUID

private static final long serialVersionUID
Serialization ID

See Also:
Constant Field Values
Constructor Detail

IndexKey

IndexKey(String text,
         int offset,
         int size,
         Key parent)
Setup with the key name and positions of data in the file


IndexKey

IndexKey(String text)
Setup with the key name. Use solely for searching.

Method Detail

getOffset

public int getOffset()
Returns:
the offset

setOffset

public void setOffset(int newOffset)
Parameters:
newOffset - the offset to set

getSize

public int getSize()
Returns:
the size

setSize

public void setSize(int newSize)
Parameters:
newSize - the size to set

clone

public Object clone()
Description copied from interface: Key
This needs to be declared here so that it is visible as a method on a derived Key.

Specified by:
clone in interface Key
Overrides:
clone in class DefaultLeafKeyList
Returns:
A complete copy of ourselves

Copyright ยจ 2003-2006