com.rubecula.jquantity
Class MutablePresentation

java.lang.Object
  extended bycom.rubecula.util.Presentation
      extended bycom.rubecula.jquantity.MutablePresentation
All Implemented Interfaces:
Auditable, java.lang.Cloneable, Identifiable, Mutable
Direct Known Subclasses:
IntegerPresentation, QuantityPresentation, ValuePresentation

public abstract class MutablePresentation
extends Presentation
implements Mutable

Class

Since:
V_0_4
Version:
$Revision: 1.1 $
Author:
Robin Hillyard

Field Summary
private  boolean _Constant
           
 
Fields inherited from class com.rubecula.util.Presentation
_Appearance, $empty, $Stars
 
Constructor Summary
MutablePresentation()
           
 
Method Summary
 java.lang.String audit()
          Method to return a detailed (unlabeled) string from an arithmetical object for debugging purposes.
 void audit(java.io.PrintStream out, java.lang.String label)
          Method to output a string from an arithmetical object for debugging purposes.
 boolean isMutable()
          This method indicates whether this particular instance is mutable, i.e. it has not been designated a constant.
 Mutable setConstant()
          This method sets this instance to be a constant, i.e. immutable.
 
Methods inherited from class com.rubecula.util.Presentation
getAttributes, getPresentableClass, parse, toString, toString, updateAppearance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rubecula.util.Auditable
audit
 
Methods inherited from interface com.rubecula.util.Identifiable
getIdentifier
 

Field Detail

_Constant

private boolean _Constant
Constructor Detail

MutablePresentation

public MutablePresentation()
Method Detail

isMutable

public boolean isMutable()
Description copied from interface: Mutable
This method indicates whether this particular instance is mutable, i.e. it has not been designated a constant.

Specified by:
isMutable in interface Mutable
Returns:
true if this instance can be mutated, otherwise false (it is constant).

setConstant

public Mutable setConstant()
Description copied from interface: Mutable
This method sets this instance to be a constant, i.e. immutable. Future calls to the isMutable() method will yield false.

Specified by:
setConstant in interface Mutable
Returns:
as a convenience this method returns itself.

audit

public void audit(java.io.PrintStream out,
                  java.lang.String label)
Method to output a string from an arithmetical object for debugging purposes.

Specified by:
audit in interface Auditable
Overrides:
audit in class Presentation
Parameters:
out - the print stream to which audit string is to be sent.
label - the label to attach to the data.

audit

public java.lang.String audit()
Method to return a detailed (unlabeled) string from an arithmetical object for debugging purposes.

Specified by:
audit in interface Auditable
Overrides:
audit in class Presentation
Returns:
the detailed string.