|
GXPARSE hosted by |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.gorman.io.Resequencer.MarkGroup<K>
public abstract static class Resequencer.MarkGroup<K>
Manager (access and temporary storage) for
Marks
with keys of type K
. Each
Resequencer.Buffer
instance has a MarkGroup
that
can either be exclusively owned, or shared with other
Buffer
instances.
Constructor Summary | |
---|---|
protected |
Resequencer.MarkGroup(List<Resequencer.Mark<K>> markList,
Map<K,Resequencer.Mark<K>> markMap)
Construct MarkGroup<K> with specified
List and Map . |
Method Summary | ||
---|---|---|
void |
close()
Close the MarkGroup and all of the Mark objects in the
MarkGroup . |
|
protected List<Resequencer.Mark<K>> |
getList()
Get the internal List used to find a
Mark by its index. |
|
protected Map<K,Resequencer.Mark<K>> |
getMap()
Get the internal Map used to find a
Mark by its key. |
|
protected Resequencer.Mark<K> |
getMark(int index)
Get an existing Mark. |
|
Resequencer.Mark<K> |
getMark(K key)
Get an existing Mark. |
|
Iterator<Resequencer.Mark<K>> |
iterator()
Get a Mark Iterator that does not support remove(). |
|
Resequencer.Mark<K> |
mark()
create a Mark with no key. |
|
Resequencer.Mark<K> |
mark(K key)
Get the Mark for a particular key, creating a Mark if one does not exist. |
|
static
|
newInstance()
Create a new MarkGroup<K> . |
|
protected Resequencer.Mark<K> |
newMark()
Create a new Mark with no key in this
MarkGroup . |
|
protected Resequencer.Mark<K> |
newMark(K key)
Create a new Mark for a specified key in this
MarkGroup . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Resequencer.MarkGroup(List<Resequencer.Mark<K>> markList, Map<K,Resequencer.Mark<K>> markMap)
Method Detail |
---|
public static <K> Resequencer.MarkGroup<K> newInstance()
Create a new MarkGroup<K>
.
public void close()
Close the MarkGroup
and all of the Mark objects in the
MarkGroup
.
close
in interface Closeable
protected Resequencer.Mark<K> newMark(K key)
Create a new Mark for a specified key
in this
MarkGroup
.
protected Resequencer.Mark<K> newMark()
Create a new Mark with no key
in this
MarkGroup
.
public Iterator<Resequencer.Mark<K>> iterator()
Get a Mark Iterator that does not support remove().
The Iterator
returns all Marks
,including
those that have no key.
The Iterator
does not support
Iterator.remove() remove
because
a Mark
cannot be removed after it has
been created.
public Resequencer.Mark<K> mark(K key)
Get the Mark for a particular key, creating a Mark if one does not exist.
key
- Identifies the mark to be retreived or created
NullPointerException
- if key
is nullpublic Resequencer.Mark<K> mark()
create a Mark with no key.
public Resequencer.Mark<K> getMark(K key)
Get an existing Mark.
NoSuchElementException
- if the Mark does not exist.protected Resequencer.Mark<K> getMark(int index)
Get an existing Mark.
IndexOutOfBoundsException
- if a Mark does not exist for that
index
or if index
< 0protected List<Resequencer.Mark<K>> getList()
Get the internal List
used to find a
Mark
by its index. All other methods in
this MarkGroup
use this method to access the
List
.
List
that is not nullprotected Map<K,Resequencer.Mark<K>> getMap()
Get the internal Map
used to find a
Mark
by its key. All other methods in
this MarkGroup
use this method to access the
Map
.
Map
that is not null
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |