visad
Class ConstantMap
- java.lang.Object
-
- visad.ScalarMap
-
- 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
Constructors Constructor and Description ConstantMap(double constant, DisplayRealType display_scalar)construct a ConstantMap with a double constantConstantMap(Real constant, DisplayRealType display_scalar)construct a ConstantMap with a Real constant;
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()Create and return a copy of this ScalarMap.intcompareTo(java.lang.Object obj)Compares this instance to another object.booleanequals(java.lang.Object o)Indicates whether or not this instance equals an Object.static booleangetAllowMultipleUseKludge()doublegetConstant()static voidsetAllowMultipleUseKludge(boolean k)allow ConstantMaps to be used in multiple calls to DisplayImpl.addReference() or addReferences() such multiple use was not checked in the early releases of VisAD, and this method allows applications to easily avoid more extensive changesjava.lang.StringtoString(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, disableAutoScale, doInitialize, equalizeFlow, getAxisScale, getControl, getDisplay, getDisplayScalar, getOverrideUnit, getRange, getScalar, getScalarName, getScale, getScaleEnable, getValueIndex, hashCode, incTick, inverseScaleValues, inverseScaleValues, isAutoScale, makeScale, peekTicks, removeScalarMapListener, resetAutoScale, scaleValues, scaleValues, scaleValues, scaleValues, setOverrideUnit, setRange, setRange, setRange, setRangeByUnits, setScalarName, setScaleColor, setScaleEnable, setTicks, setUnderscoreToBlank, setValueIndex, toString
-
-
-
-
Constructor Detail
-
ConstantMap
public ConstantMap(double constant, DisplayRealType display_scalar) throws VisADExceptionconstruct a ConstantMap with a double constant- Parameters:
constant- - double equated to DisplayRealTypedisplay_scalar- - DisplayRealType set to constant (may not be Animation, SelectValue, SelectRange or IsoContour)- Throws:
VisADException- - a VisAD error occurred
-
ConstantMap
public ConstantMap(Real constant, DisplayRealType display_scalar) throws VisADException
construct a ConstantMap with a Real constant;- Parameters:
constant- - Real whose value is equated to DisplayRealTypedisplay_scalar- - DisplayRealType set to constant (may not be Animation, SelectValue, SelectRange or IsoContour)- Throws:
VisADException- - a VisAD error occurred
-
-
Method Detail
-
setAllowMultipleUseKludge
public static void setAllowMultipleUseKludge(boolean k)
allow ConstantMaps to be used in multiple calls to DisplayImpl.addReference() or addReferences() such multiple use was not checked in the early releases of VisAD, and this method allows applications to easily avoid more extensive changes- Parameters:
k- - true to allow multiple use
-
getAllowMultipleUseKludge
public static boolean getAllowMultipleUseKludge()
- Returns:
- boolean indicating whether ConstantMaps may be used in multiple calls to DisplayImpl.addReference() or addReferences()
-
getConstant
public double getConstant()
- Returns:
- constant value mapped to DisplayRealType
-
equals
public boolean equals(java.lang.Object o)
Indicates whether or not this instance equals an Object.
-
compareTo
public int compareTo(java.lang.Object obj)
Compares this instance to another object.- Specified by:
compareToin interfacejava.lang.Comparable- Overrides:
compareToin classScalarMap- 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.
-
clone
public java.lang.Object clone()
Description copied from class:ScalarMapCreate and return a copy of this ScalarMap.
-
toString
public java.lang.String toString(java.lang.String pre)
Description copied from class:ScalarMapReturns a string representation of the ScalarMap with the specified prefix prepended.
-
-
DMelt 3.0 © DataMelt by jWork.ORG