org.pz.platypus.commandTypes
Class EolTreatment

java.lang.Object
  extended by org.pz.platypus.commandTypes.EolTreatment

public class EolTreatment
extends java.lang.Object

The possible end-of-line treatments. Cannot use enums because of the way the Value class is set up. soft = [cr] is treated as a space, two [cr]'s are treated as a [] hard = [cr] is treated as []

Author:
alb

Field Summary
static int HARD
           
private static java.lang.String HARD_STR
           
static int SOFT
           
private static java.lang.String SOFT_STR
           
 
Constructor Summary
EolTreatment()
           
 
Method Summary
 boolean isSoft(int treatment)
           
 boolean isValid(java.lang.String treatment)
          Determines whether a treatment specifider is valid or not
 int toInteger(java.lang.String treatment)
          Converts the treatment string specified in the command to a valid int representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOFT

public static final int SOFT
See Also:
Constant Field Values

HARD

public static final int HARD
See Also:
Constant Field Values

SOFT_STR

private static final java.lang.String SOFT_STR
See Also:
Constant Field Values

HARD_STR

private static final java.lang.String HARD_STR
See Also:
Constant Field Values
Constructor Detail

EolTreatment

public EolTreatment()
Method Detail

isValid

public boolean isValid(java.lang.String treatment)
Determines whether a treatment specifider is valid or not

Parameters:
treatment - the specifier, which can only be soft/hard currently
Returns:
true if valid, false if not.

toInteger

public int toInteger(java.lang.String treatment)
              throws EolTreatmentException
Converts the treatment string specified in the command to a valid int representation

Parameters:
treatment - the string as specified
Returns:
the integer value of the treatment type
Throws:
EolTreatmentException - if the input string is invalid

isSoft

public boolean isSoft(int treatment)


Copyright © 2008-10 Pacific Data Works LLC