public static class Series.Separator extends Series
separator
can be any character.
The terminology "variable" is used in statistics and refers to
a column of values in a spreadsheet (.csv, data-set), say.
You may also be interested in Series.Lines
.Series.Discrete, Series.Int, Series.Lines, Series.Range, Series.Separator
Modifier and Type | Field and Description |
---|---|
java.lang.String |
s
The String being scanned for variables.
|
char |
separator
The separator between variables, often but not always ','.
|
boolean |
trimHead
To trim white space from heads and tails, or not?
|
boolean |
trimTail
To trim white space from heads and tails, or not?
|
Constructor and Description |
---|
Separator(boolean trimHead,
boolean trimTail,
char separator,
java.lang.String s)
Note, if separator =' ', trimming makes no sense.
|
Separator(char separator,
java.lang.String s)
Construct a Separator with a given separator character.
|
Separator(java.lang.String s)
Construct a Separator with the most common choice,
separator = ','.
|
Modifier and Type | Method and Description |
---|---|
void |
advance()
Advance to the next variable, if any.
|
Value.Chars |
elt()
Return the current element, if there is one, but do
not
Series.advance() . |
boolean |
hasSome()
Is there at least a current element, (
Series.elt() )?
Also see Series.hasNone() . |
int |
position()
What position in the Series are we at (starting at zero)?
If
Series.hasNone() , the series was finite and position()
is now its length. |
java.lang.String |
toString()
Return a short String description of 'this' Series,
say for use in debugging.
|
public final java.lang.String s
public final char separator
public final boolean trimHead
public final boolean trimTail
public Separator(java.lang.String s)
public Separator(char separator, java.lang.String s)
public Separator(boolean trimHead, boolean trimTail, char separator, java.lang.String s)
public int position()
Series
Series.hasNone()
, the series was finite and position()
is now its length.public boolean hasSome()
Series
Series.elt()
)?
Also see Series.hasNone()
.public Value.Chars elt()
Series
Series.advance()
. Should throw an Exception
if hasNone()
.public void advance()