flattree.tree
Class ConstantLeaf
java.lang.Object
flattree.tree.AbstractLeaf
flattree.tree.ConstantLeaf
- All Implemented Interfaces:
- Leaf
public class ConstantLeaf
- extends AbstractLeaf
A Leaf
writing/reading constant characters without value in the tree.
- See Also:
setConstant(String)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantLeaf
public ConstantLeaf()
ConstantLeaf
public ConstantLeaf(String constant)
getConstant
public String getConstant()
- Get the constant.
- Returns:
- constant
setConstant
public void setConstant(String constant)
- Set the constant.
- Parameters:
constant
-
writeImpl
protected void writeImpl(WriteLine line,
State state)
- Writes the constant.
- Specified by:
writeImpl
in class AbstractLeaf
- See Also:
setConstant(String)
readImpl
protected boolean readImpl(ReadLine line,
State state)
- Reads the constant.
- Specified by:
readImpl
in class AbstractLeaf
- Throws:
TreeException
- if read characters don't equal the configured constant
Copyright © 2011. All Rights Reserved.