|
GXPARSE hosted by |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Writer
ca.gorman.io.Resequencer.Mark<K>
public abstract static class Resequencer.Mark<K>
Associates data with a key of type K and contains other
internal data to support efficient operation.
| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
protected |
Resequencer.Mark(Resequencer.MarkGroup<K> markGroup,
K key,
int index)
Create a Mark instance with its identifiers (key and index), and the MarkGroup that owns it. |
| Method Summary | |
|---|---|
void |
close()
Close the stream, flushing it first. |
void |
flush()
Flush the stream. |
int |
getIndex()
Get the index of this Mark in its
MarkGroup. |
K |
getKey()
Get the key of this Mark in its
MarkGroup. |
protected Resequencer.MarkGroup<K> |
getMarkGroup()
Get the MarkGroup that owns this
Mark. |
void |
reset()
Restores the Mark to its initial empty
state. |
char[] |
toCharArray()
Returns a copy of the characters stored in the Mark. |
String |
toString()
Returns a copy of the characters stored in the Mark. |
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters to the Mark. |
void |
writeTo(Writer out)
Writes the contents of the Mark to another
character stream. |
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Resequencer.Mark(Resequencer.MarkGroup<K> markGroup,
K key,
int index)
Create a Mark instance with its identifiers (key and index), and
the MarkGroup that owns it.
A Mark can only belong to one
MarkGroup.
key - The key to be used in the mapmarkGroup - The MarkGroup that is creating (and
will own) this Markindex - The index of the Mark in the
MarkGroup| Method Detail |
|---|
protected Resequencer.MarkGroup<K> getMarkGroup()
Get the MarkGroup that owns this
Mark.
public K getKey()
Get the key of this Mark in its
MarkGroup.
public int getIndex()
Get the index of this Mark in its
MarkGroup. This method is used when
replacing marked points by the data associated with the
Mark..
public void reset()
Restores the Mark to its initial empty
state.
public char[] toCharArray()
Returns a copy of the characters stored in the
Mark.
public String toString()
Returns a copy of the characters stored in the
Mark.
toString in class Object
public void writeTo(Writer out)
throws IOException
Writes the contents of the Mark to another
character stream. The contents of the Mark are not
altered by this method.
IOException
public void flush()
throws IOException
Flush the stream.
flush in interface Flushableflush in class WriterIOException
public void close()
throws IOException
Close the stream, flushing it first.
close in interface Closeableclose in class WriterIOException
public void write(char[] cbuf,
int off,
int len)
throws IOException
Write a portion of an array of characters to the
Mark.
write in class WriterIOException
|
GXPARSE download | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||