|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcalhoun.analysis.crf.io.NameInputSequence
public class NameInputSequence
input sequence that captures the 'name' of a sequence. This is useful for display or for tracking outputs, but usually won't be used by the engine. The full sequence name is returned as the data element for every position. In this respect it is not really a sequence.
This feature has some special properties that allow sequences to be tracked as they are subsetted.
When subsetting a NameInputSequence, a string is append to the name showing the start and stop (one-based
inclusive) of the subsetting. For example, if the sequence with name "CND1" is subsetting to based 201 to 1000, then
the new name will be "CND1:201-1000". To avoid repetitive subsetting, the NameInput does not allow subsetting on names
containing a '-'.
| Constructor Summary | |
|---|---|
NameInputSequence()
default constructor |
|
NameInputSequence(java.lang.String a)
constructors an input sequence using this name |
|
| Method Summary | |
|---|---|
InputSequence<?> |
getComponent(java.lang.String name)
For input sequences that are a composite of several different input objects, returns a particular component of the input. |
java.lang.String |
getName()
|
java.lang.String |
getX(int ix)
retrieves the input value at a position in the input sequence. |
int |
length()
Returns the length of this sequence |
java.util.Collection<java.lang.String> |
listComponents()
For input sequences that are a composite of several different input objects, returns a list of the names of the components in this input sequence. |
InputSequence<java.lang.String> |
subSequence(int start,
int end)
tTakes a subinterval of the input sequence with given start-end coordinates which are relative coordinates, 1-based, and inclusive. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NameInputSequence()
public NameInputSequence(java.lang.String a)
| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getX(int ix)
InputSequence
getX in interface InputSequence<java.lang.String>ix - the index position at which to get the input. This is a zero-based index.
public int length()
InputSequence
length in interface InputSequence<java.lang.String>public InputSequence<?> getComponent(java.lang.String name)
InputSequenceUnsupportedOperationException.
getComponent in interface InputSequence<java.lang.String>name - the name of the input component to return
public java.util.Collection<java.lang.String> listComponents()
InputSequence
listComponents in interface InputSequence<java.lang.String>
public InputSequence<java.lang.String> subSequence(int start,
int end)
InputSequence
An implementation that does not support subsetting should throw an UnsupportedOperationException
subSequence in interface InputSequence<java.lang.String>start - the 1-based index of the first position of the input to retrieve.end - the 1-based index of the last position of the input to retrieve.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||