|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sadun.util.LineSet
An ordered set of Strings, to which filters can be applied
Nested Class Summary | |
static class |
LineSet.BaseFilter
|
static class |
LineSet.ConstantFilter
A constant filter, which always matches or not matches |
static class |
LineSet.ContainsStringFilter
A Filter which matches lines containing one or more substring. |
static interface |
LineSet.Filter
A Filter for matching certain lines in the set. |
Field Summary | |
static LineSet.Filter |
NULL_FILTER
|
Constructor Summary | |
LineSet()
Constructor for LineSet. |
|
LineSet(java.lang.String[] lines)
Constructor for LineSet. |
Method Summary | |
void |
add(java.lang.String line)
Add a line to the set |
int |
count(LineSet.Filter filter)
Count the lines matching the filter. |
static LineSet |
create(java.lang.String text)
|
static LineSet |
create(java.lang.String text,
java.lang.String lineSeparator)
|
java.lang.String[] |
getLines(LineSet.Filter filter)
|
java.util.List |
getLinesList(LineSet.Filter filter)
|
java.lang.String |
toString()
|
java.lang.String |
toString(LineSet.Filter filter)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static LineSet.Filter NULL_FILTER
Constructor Detail |
public LineSet()
public LineSet(java.lang.String[] lines)
Method Detail |
public void add(java.lang.String line)
public int count(LineSet.Filter filter)
NULL_FILTER
can be used.
* @param filter the filter to match
* @return int the number of lines matching the filter
public java.util.List getLinesList(LineSet.Filter filter)
public java.lang.String[] getLines(LineSet.Filter filter)
public java.lang.String toString(LineSet.Filter filter)
public java.lang.String toString()
public static LineSet create(java.lang.String text, java.lang.String lineSeparator)
public static LineSet create(java.lang.String text)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |