org.extex.core.muskip
Class Muskip

java.lang.Object
  extended by org.extex.core.muskip.Mudimen
      extended by org.extex.core.muskip.Muskip
All Implemented Interfaces:
java.io.Serializable

public class Muskip
extends Mudimen
implements java.io.Serializable

This class provides a skip value with a variable length of order 0. The actual length is a multiple of math units (mu).

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

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
Muskip()
          Creates a new object.
Muskip(boolean kill)
          Creates a new object.
Muskip(FixedDimen theLength)
          Creates a new object.
Muskip(FixedDimen theLength, FixedGlueComponent theStretch, FixedGlueComponent theShrink)
          Creates a new object.
Muskip(FixedGlueComponent theLength, FixedGlueComponent theStretch, FixedGlueComponent theShrink, boolean kill)
          Creates a new object.
Muskip(long theLength)
          Creates a new object.
Muskip(Muskip x)
          Creates a new object.
 
Method Summary
 void add(Muskip ms)
          Add another muglue to this one.
 GlueComponent getShrink()
          Getter for shrink.
 GlueComponent getStretch()
          Getter for stretch.
 boolean isKill()
          Getter for kill.
 boolean isZero()
          Check that the muskip has natural length zero and no stretch and shrink component.
 void multiply(long nom, long denom)
          Multiply all components by an integer fraction.
 void setKill(boolean kill)
          Setter for kill.
 java.lang.String toString()
          Return the string representation of the instance.
 void toString(java.lang.StringBuffer sb)
          Append the string representation of the instance to a string buffer.
 
Methods inherited from class org.extex.core.muskip.Mudimen
add, getLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

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

See Also:
Constant Field Values
Constructor Detail

Muskip

public Muskip()
Creates a new object. All components are 0.


Muskip

public Muskip(boolean kill)
Creates a new object. All components are 0.

Parameters:
kill - the kill indicator

Muskip

public Muskip(FixedDimen theLength)
Creates a new object. Strechablity and shrinkability are 0.

Parameters:
theLength - the natural length

Muskip

public Muskip(long theLength)
Creates a new object. Strechablity and shrinkability are 0.

Parameters:
theLength - the natural length

Muskip

public Muskip(FixedDimen theLength,
              FixedGlueComponent theStretch,
              FixedGlueComponent theShrink)
Creates a new object.

Parameters:
theLength - the natural length
theStretch - the stretchability
theShrink - the shrinkability

Muskip

public Muskip(FixedGlueComponent theLength,
              FixedGlueComponent theStretch,
              FixedGlueComponent theShrink,
              boolean kill)
Creates a new object.

Parameters:
theLength - the natural length
theStretch - the stretchability
theShrink - the shrinkability
kill - the indicator for the killing behavior

Muskip

public Muskip(Muskip x)
Creates a new object.

Parameters:
x - the other muskip
Method Detail

add

public void add(Muskip ms)
Add another muglue to this one. The addition is performed independently on the components.

Parameters:
ms - the muglue to add

getShrink

public GlueComponent getShrink()
Getter for shrink.

Returns:
the shrink

getStretch

public GlueComponent getStretch()
Getter for stretch.

Returns:
the stretch

isKill

public boolean isKill()
Getter for kill.

Returns:
the kill

isZero

public boolean isZero()
Check that the muskip has natural length zero and no stretch and shrink component.

Overrides:
isZero in class Mudimen
Returns:
true iff the register is zero

multiply

public void multiply(long nom,
                     long denom)
Multiply all components by an integer fraction.

Overrides:
multiply in class Mudimen
Parameters:
nom - nominator
denom - denominator

setKill

public void setKill(boolean kill)
Setter for kill.

Parameters:
kill - the kill to set

toString

public java.lang.String toString()
Return the string representation of the instance.

Overrides:
toString in class Mudimen
Returns:
the string representation of this glue
See Also:
"TeX – The Program [???]"

toString

public void toString(java.lang.StringBuffer sb)
Append the string representation of the instance to a string buffer.

Overrides:
toString in class Mudimen
Parameters:
sb - the target string buffer