visad
Class ConstantMap

java.lang.Object
  extended by visad.ScalarMap
      extended by visad.ConstantMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class ConstantMap
extends ScalarMap

mapping from constant to DisplayRealType

See Also:
Serialized Form

Constructor Summary
ConstantMap(double constant, DisplayRealType display_scalar)
          construct a ConstantMap with a double constant; display_scalar may not be Animation, SelectValue, SelectRange or IsoContour
ConstantMap(Real constant, DisplayRealType display_scalar)
          construct a ConstantMap with a Real constant; display_scalar may not be Animation, SelectValue, SelectRange or IsoContour
 
Method Summary
 java.lang.Object clone()
          Create and return a copy of this ScalarMap.
protected  int compareTo(ConstantMap that)
          Compares this instance to another instance.
 int compareTo(java.lang.Object obj)
          Compares this instance to another object.
protected  int compareTo(ScalarMap that)
          Compares this instance to a ScalarMap.
 boolean equals(java.lang.Object o)
          Indicates if this ScalarMap is the same as another object.
static boolean getAllowMultipleUseKludge()
           
 double getConstant()
           
static void setAllowMultipleUseKludge(boolean k)
           
 java.lang.String toString(java.lang.String pre)
          Returns a string representation of the ScalarMap with the specified prefix prepended.
 
Methods inherited from class visad.ScalarMap
addScalarMapListener, badRange, checkTicks, copy, doInitialize, equalizeFlow, getAxisScale, getControl, getDisplay, getDisplayScalar, getOverrideUnit, getRange, getScalar, getScalarName, getScale, getScaleEnable, getValueIndex, hashCode, incTick, inverseScaleValues, makeScale, peekTicks, removeScalarMapListener, resetAutoScale, scaleValues, scaleValues, setOverrideUnit, setRange, setRange, setRange, setRangeByUnits, setScalarName, setScaleColor, setScaleEnable, setTicks, setUnderscoreToBlank, setValueIndex, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantMap

public ConstantMap(double constant,
                   DisplayRealType display_scalar)
            throws VisADException
construct a ConstantMap with a double constant; display_scalar may not be Animation, SelectValue, SelectRange or IsoContour

Throws:
VisADException

ConstantMap

public ConstantMap(Real constant,
                   DisplayRealType display_scalar)
            throws VisADException
construct a ConstantMap with a Real constant; display_scalar may not be Animation, SelectValue, SelectRange or IsoContour

Throws:
VisADException
Method Detail

setAllowMultipleUseKludge

public static void setAllowMultipleUseKludge(boolean k)

getAllowMultipleUseKludge

public static boolean getAllowMultipleUseKludge()

getConstant

public double getConstant()

equals

public boolean equals(java.lang.Object o)
Description copied from class: ScalarMap
Indicates if this ScalarMap is the same as another object.

Overrides:
equals in class ScalarMap
Parameters:
o - The other object.
Returns:
true if and only if the other object is a ScalarMap and compares equal to this ScalarMap.

compareTo

public int compareTo(java.lang.Object obj)
Compares this instance to another object.

Specified by:
compareTo in interface java.lang.Comparable
Overrides:
compareTo in class ScalarMap
Parameters:
obj - The other object.
Returns:
A value that is negative, zero, or positive depending on whether this instance is considered less than, equal to, or greater than the other object, respectively.

compareTo

protected int compareTo(ConstantMap that)
Compares this instance to another instance.

Parameters:
that - The other instance.
Returns:
A value that is negative, zero, or positive depending on whether this instance is considered less than, equal to, or greater than the other instance, respectively.

compareTo

protected int compareTo(ScalarMap that)
Compares this instance to a ScalarMap.

Overrides:
compareTo in class ScalarMap
Parameters:
that - The ScalarMap.
Returns:
-1 always. ConstantMap-s are considered less than true ScalarMap-s.

clone

public java.lang.Object clone()
Description copied from class: ScalarMap
Create and return a copy of this ScalarMap.

Overrides:
clone in class ScalarMap
Returns:
copy of the ScalarMap or null if a copy couldn't be created.

toString

public java.lang.String toString(java.lang.String pre)
Description copied from class: ScalarMap
Returns a string representation of the ScalarMap with the specified prefix prepended.

Overrides:
toString in class ScalarMap
Parameters:
pre - prefix to prepend to the representation
Returns:
a string that "textually represents" this ScalarMap with pre prepended.