org.foray.ps
Class PsReal

java.lang.Object
  extended by org.foray.ps.PsNumber
      extended by org.foray.ps.PsReal
All Implemented Interfaces:
Cloneable, Comparable<PsNumber>, PsObject, PsObjectSimple

public class PsReal
extends PsNumber

Class representing PostScript object that is a real number.


Constructor Summary
PsReal(BigDecimal value)
          Constructor for a BigDecimal value.
 
Method Summary
 PsReal clone()
           
static PsReal create(PsInterpreter4a interpreter, byte[] input)
          Static method to attempt to create a PSReal instance, if the input qualifies.
 PsReal duplicate()
          This is a shallow copy.
 PsName getTypeName()
          Needed for the "type" operator.
 boolean isComposite()
          The method should be overridden by composite objects.
 boolean isExecutable()
          Indicates whether this object is executable.
 String toString()
           
 
Methods inherited from class org.foray.ps.PsNumber
add, compareTo, divide, equals, getDoubleValue, getFloatValue, getValue, isAlphabetic, isComparable, isMember, isNumeral, multiply, negate, round, subtract
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PsReal

public PsReal(BigDecimal value)
Constructor for a BigDecimal value.

Parameters:
value - The value to encapsulate.
Method Detail

clone

public PsReal clone()
Specified by:
clone in class PsNumber

create

public static PsReal create(PsInterpreter4a interpreter,
                            byte[] input)
Static method to attempt to create a PSReal instance, if the input qualifies.

Parameters:
interpreter - The parent interpreter.
input - The byte array containing the content to be converted to a PSReal instance.
Returns:
A PsReal instance, if the input qualifies, otherwise, null.

duplicate

public PsReal duplicate()
Description copied from interface: PsObject
This is a shallow copy. Specifically, composite objects should generally return themselves. Simple objects should return copies of themselves.

Returns:
A duplicate of this that conforms to what is expected by the "dup" operator.

isExecutable

public boolean isExecutable()
Description copied from interface: PsObject
Indicates whether this object is executable.

Returns:
True iff this object is executable.

getTypeName

public PsName getTypeName()
Description copied from interface: PsObject
Needed for the "type" operator.

Returns:
The type name as defined in PSRM2, Chapter 8, "type" operator.

toString

public String toString()
Overrides:
toString in class Object

isComposite

public boolean isComposite()
Description copied from interface: PsObject
The method should be overridden by composite objects.

Returns:
True iff this object is a composite PostScript object.


Copyright © 2017. All rights reserved.