|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface InputSequence<A>
represents the observed inputs. Contains a sequence of inputs, and allows them to be retrieved by position.
An input sequence may be made up of different components. If it contains components the getComponent(java.lang.String) and
listComponents() functions must be implemented. Otherwise they can just trhow UnsupportedOperationException.
In some cases, the input may not be a sequence. It may be a single input value that is returned for all positions. In
this case, the length value can return -1 and the getX(int) function can return the same object at each position.
| 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. |
A |
getX(int x)
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<A> |
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. |
| Method Detail |
|---|
A getX(int x)
x - the index position at which to get the input. This is a zero-based index.
int length()
InputSequence<A> subSequence(int start,
int end)
An implementation that does not support subsetting should throw an UnsupportedOperationException
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.
InputSequence<?> getComponent(java.lang.String name)
UnsupportedOperationException.
name - the name of the input component to return
java.util.Collection<java.lang.String> listComponents()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||