de.dante.extex.interpreter.type.dimen
Class ImmutableDimen

java.lang.Object
  extended byde.dante.extex.interpreter.type.glue.GlueComponent
      extended byde.dante.extex.interpreter.type.dimen.Dimen
          extended byde.dante.extex.interpreter.type.dimen.ImmutableDimen
All Implemented Interfaces:
FixedDimen, FixedGlueComponent, java.io.Serializable

public class ImmutableDimen
extends Dimen
implements java.io.Serializable

This class provides objects of type Dimen where all assignment methods are redefined to produce a run-time exception. Thus the object is in fact immutable.

Version:
$Revision: 1.13 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Fields inherited from class de.dante.extex.interpreter.type.dimen.Dimen
ONE_INCH, ONE_PT, ONE_SP, ZERO_PT
 
Fields inherited from class de.dante.extex.interpreter.type.glue.GlueComponent
MINUS_ONE_FIL, ONE, ONE_FI, ONE_FIL, ONE_FILL, ZERO
 
Constructor Summary
ImmutableDimen(Dimen value)
          Creates a new object.
ImmutableDimen(long value)
          Creates a new object.
 
Method Summary
 void add(Dimen d)
           
 void divide(long denom)
          Divide the current value with a given number.
 void max(Dimen d)
           
 void multiply(long factor)
          Multiply the current value with a given number.
 void subtract(FixedDimen d)
          Subtract the value of the argument from the current value.
 
Methods inherited from class de.dante.extex.interpreter.type.dimen.Dimen
abs, add, add, getLocalizer, isZero, max, min, negate, parse, set
 
Methods inherited from class de.dante.extex.interpreter.type.glue.GlueComponent
add, attachUnit, copy, eq, ge, getMyLocalizer, getOrder, getValue, gt, le, lt, multiply, ne, parse, parse, set, setValue, subtract, toString, toString, toString, toToks, toToks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.dante.extex.interpreter.type.glue.FixedGlueComponent
copy, eq, ge, getOrder, getValue, gt, le, lt, ne, toString, toString, toToks, toToks
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

ImmutableDimen

public ImmutableDimen(Dimen value)
Creates a new object.

Parameters:
value - the value to be stored

ImmutableDimen

public ImmutableDimen(long value)
Creates a new object.

Parameters:
value - the value to be stored
Method Detail

add

public void add(Dimen d)
See Also:
Dimen.add( de.dante.extex.interpreter.type.dimen.FixedDimen)

divide

public void divide(long denom)
Description copied from class: Dimen
Divide the current value with a given number. This operation modifies this instance.

|this| → |this| / denom

Overrides:
divide in class Dimen
Parameters:
denom - denominator to divide by
See Also:
Dimen.divide(long)

max

public void max(Dimen d)
See Also:
Dimen.max( de.dante.extex.interpreter.type.dimen.FixedDimen)

multiply

public void multiply(long factor)
Description copied from class: Dimen
Multiply the current value with a given number. This operation modifies this instance.

|this| → |this| * factor

Overrides:
multiply in class Dimen
Parameters:
factor - the factor to multiply with
See Also:
Dimen.multiply(long)

subtract

public void subtract(FixedDimen d)
Description copied from class: Dimen
Subtract the value of the argument from the current value. This operation modifies the instance.

|this| → |this| - |d|

Overrides:
subtract in class Dimen
Parameters:
d - the Dimen to subtract
See Also:
Dimen.subtract( de.dante.extex.interpreter.type.dimen.FixedDimen)