|
Copyright (C) 2003,2004 dr. Cristiano Sadun | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sadun.text.ffp.ConstantLineCondition
A condition which holds only if the next line on the file is identical to the a given constant.
Constructor Summary | |
ConstantLineCondition(java.lang.String constant)
Create a condition which use the given constant. |
Method Summary | |
java.lang.String |
getConstant()
Return the constant used by this condition. |
boolean |
holds(int logicalLineCount,
int physicalLineCount,
FlatFileParser.LineReader reader)
Return true if there is one physical line available in the file, and it is identical to the constant provided at construction. |
java.lang.String |
toString()
Return a human-readable description of the condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ConstantLineCondition(java.lang.String constant)
constant
- the constant to useMethod Detail |
public boolean holds(int logicalLineCount, int physicalLineCount, FlatFileParser.LineReader reader) throws java.io.IOException
holds
in interface FlatFileParser.Condition
logicalLineCount
- the logical lines read so farphysicalLineCount
- the physical lines read so farreader
- an object allowing to read lines on the file
java.io.IOException
- if a I/O problem arises when reading linespublic java.lang.String getConstant()
public java.lang.String toString()
FlatFileParser.Condition
toString
in interface FlatFileParser.Condition
|
Copyright (C) 2003,2004 dr. Cristiano Sadun | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |