platypus
Class ParsedUnit

java.lang.Object
  extended by platypus.ParsedUnit

public class ParsedUnit
extends java.lang.Object

Purely a data structure used for returning units information from parsers. It contains, to speak of, no logic. For this reason, there also no unit tests for this class.

Author:
alb

Field Summary
private  float amount
          the number of units
private  boolean atEnd
          is the next character the end of the command? so: ] or }] or the like
private  int charsParsed
          how many chars were taken up with the number and the units?
private  int errorCode
          if an error occured (unit = ERROR), what kind was it?
private  PlatyConst.unit unit
          the type of unit.
 
Constructor Summary
ParsedUnit()
           
 
Method Summary
 float getAmount()
           
 int getCharsParsed()
           
 int getErrorCode()
           
 PlatyConst.unit getUnit()
           
 boolean isAtEnd()
           
 void setAmount(float amount)
           
 void setAtEnd(boolean atEnd)
           
 void setCharsParsed(int charsParsed)
           
 void setErrorCode(int errorCode)
           
 void setUnit(PlatyConst.unit unit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

amount

private float amount
the number of units


unit

private PlatyConst.unit unit
the type of unit. e.g. POINTS, PIXELS, INCHES, etc.


errorCode

private int errorCode
if an error occured (unit = ERROR), what kind was it?


charsParsed

private int charsParsed
how many chars were taken up with the number and the units?


atEnd

private boolean atEnd
is the next character the end of the command? so: ] or }] or the like

Constructor Detail

ParsedUnit

public ParsedUnit()
Method Detail

getAmount

public float getAmount()

setAmount

public void setAmount(float amount)

getUnit

public PlatyConst.unit getUnit()

setUnit

public void setUnit(PlatyConst.unit unit)

getErrorCode

public int getErrorCode()

setErrorCode

public void setErrorCode(int errorCode)

getCharsParsed

public int getCharsParsed()

setCharsParsed

public void setCharsParsed(int charsParsed)

isAtEnd

public boolean isAtEnd()

setAtEnd

public void setAtEnd(boolean atEnd)


Copyright © 2006-7 Pacific Data Works LLC