Documentation of 'visad.RealType' Java class
RealType
visad

Class RealType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable
    Direct Known Subclasses:
    DisplayRealType, Quantity


    public class RealType
    extends ScalarType
    RealType is the VisAD scalar data type for real number variables.

    See Also:
    Serialized Form
    • Field Detail

      • INTERVAL

        public static final int INTERVAL
        The interval attribute. This attribute should be used during construction of a RealType if the RealType refers to an interval (e.g. length difference, delta temperature). In general, RealType-s that are temporal in nature should have this attribute because the "time" variable in most formulae actually refer to time differences (e.g. "time since the beginning of the experiment"). One obvious exception to this lies with cosmology, where "time" is absolute rather than an interval.
        See Also:
        Constant Field Values
      • XAxis

        public static final RealType XAxis
        Cartesian spatial coordinate - X axis
      • YAxis

        public static final RealType YAxis
        Cartesian spatial coordinate - Y axis
      • ZAxis

        public static final RealType ZAxis
        Cartesian spatial coordinate - Z axis
      • Latitude

        public static final RealType Latitude
        Spherical spatial coordinate for Latitude
      • Longitude

        public static final RealType Longitude
        Spherical spatial coordinate for Longitude
      • Altitude

        public static final RealType Altitude
      • Radius

        public static final RealType Radius
      • TimeInterval

        public static final RealType TimeInterval
        Temporal-interval coordinate
      • Time

        public static final RealType Time
        Timestamp coordinate
      • Declination

        public static final RealType Declination
        astronomical coordinates
      • RightAscension

        public static final RealType RightAscension
      • Generic

        public static final RealType Generic
        generic RealType
    • Constructor Detail

      • RealType

        public RealType(java.lang.String name)
                 throws VisADException
        Deprecated. Use getRealType(String)
        Constructs from a name (two RealTypes are equal if their names are equal). Assumes null for the default Unit and default Set and that the RealType does not refer to an interval.
        Parameters:
        name - The name for the RealType.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
      • RealType

        public RealType(java.lang.String name,
                        int attrMask)
                 throws VisADException
        Deprecated. Use getRealType(String, int)
        Constructs from a name (two RealTypes are equal if their names are equal) and whether or not the RealType refers to an interval (e.g. length difference, delta temperature). Assumes null for the default Unit and default Set.
        Parameters:
        name - The name for the RealType.
        attrMask - The attribute mask. 0 or INTERVAL.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
      • RealType

        public RealType(java.lang.String name,
                        Unit u,
                        Set set)
                 throws VisADException
        Constructs from a name (two RealTypes are equal if their names are equal) a default Unit, and a default Set. Assumes that the RealType does not refer to an interval.
        Parameters:
        name - The name for the RealType.
        u - The default unit for the RealType. May be null.
        set - The default sampling set for the RealType. Used when this type is a FunctionType domain. May be null.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
      • RealType

        public RealType(java.lang.String name,
                        Unit u)
                 throws VisADException
        Deprecated. Use getRealType(String, Unit)
        Constructs from a name (two RealTypes are equal if their names are equal) and a default Unit. Assumes the default Set, and that the RealType does not refer to an interval.
        Parameters:
        name - The name for the RealType.
        u - The default unit for the RealType. May be null.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
      • RealType

        public RealType(java.lang.String name,
                        Unit u,
                        Set set,
                        int attrMask)
                 throws VisADException
        Constructs from a name (two RealTypes are equal if their names are equal) a default Unit, a default Set, and whether or not the RealType refers to an interval (e.g. length difference, delta temperature). This is the most general, public constructor.
        Parameters:
        name - The name for the RealType.
        u - The default unit for the RealType. May be null. If non-null and the RealType refers to an interval, then the default unit will actually be u.getAbsoluteUnit().
        set - The default sampling set for the RealType. Used when this type is a FunctionType domain. May be null.
        attrMask - The attribute mask. 0 or INTERVAL.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
    • Method Detail

      • getAttributeMask

        public final int getAttributeMask()
        Gets the attribute mask of this RealType.
        Returns:
        The attribute mask of this RealType.
      • isInterval

        public final boolean isInterval()
        Indicates whether or not this RealType refers to an interval (e.g. length difference, delta temperature).
        Returns:
        Whether or not this RealType refers to an interval.
      • getDefaultUnit

        public Unit getDefaultUnit()
        get default Unit
      • getDefaultSet

        public Set getDefaultSet()
        get default Set
      • setDefaultSet

        public void setDefaultSet(Set sampling)
                           throws VisADException
        set the default Set; this is a violation of MathType immutability to allow a a RealType to be an argument (directly or through a SetType) to the constructor of its default Set; this method throws an Exception if getDefaultSet has previously been invoked
        Throws:
        VisADException
      • equals

        public boolean equals(java.lang.Object type)
        Check the equality of type with this RealType; two RealType-s are equal if they have the same name, convertible DefaultUnit-s, same DefaultSet and attrMask; a RealType copied from a remote Java virtual machine may have the same name but different values for other fields
        Overrides:
        equals in class ScalarType
        Parameters:
        type - object in question
        Returns:
        true if type is a RealType and the conditions above are met
      • equalsExceptName

        public boolean equalsExceptName(MathType type)
        any two RealType-s are equal except Name
        Specified by:
        equalsExceptName in class MathType
      • equalsExceptNameButUnits

        public boolean equalsExceptNameButUnits(MathType type)
        Check to see if type has convertible units with this RealType.
        Specified by:
        equalsExceptNameButUnits in class MathType
        Parameters:
        type - MathType to check
        Returns:
        true if type is a RealType or a RealTupleType of dimension 1 AND the units are convertible with this RealType's default Unit.
      • getRealType

        public static final RealType getRealType(java.lang.String name)
        Returns a RealType corresponding to a name. If a RealType with the given name doesn't exist, then it's created (with default unit, representational set, and attribute mask) and returned; otherwise, the previously existing RealType is returned if it is compatible with the input arguments (the unit, representational set, and attribute mask are ignored in the comparison); otherwise null is returned.
        Parameters:
        name - The name for the RealType.
        Returns:
        A RealType corresponding to the input arguments or null.
        Throws:
        java.lang.NullPointerException - if the name is null.
      • getRealType

        public static final RealType getRealType(java.lang.String name,
                                                 Unit u)
        Returns a RealType corresponding to a name and unit. If a RealType with the given name doesn't exist, then it's created (with default representational set and attribute mask) and returned; otherwise, the previously existing RealType is returned if it is compatible with the input arguments (the representational set and attribute mask are ignored in the comparison); otherwise null is returned. Note that the unit of the returned RealType will be convertible with the unit argument but might not equal it.
        Parameters:
        name - The name for the RealType.
        u - The unit for the RealType.
        Returns:
        A RealType corresponding to the input arguments or null.
        Throws:
        java.lang.NullPointerException - if the name is null.
      • getRealType

        public static RealType getRealType(java.lang.String name,
                                           int attrMask)
        Returns a RealType corresponding to a name and attribute mask. If a RealType with the given name doesn't exist, then it's created (with default unit and representational set) and returned; otherwise, the previously existing RealType is returned if it is compatible with the input arguments (the unit and representational set are ignored in the comparison); otherwise null is returned. Note that the unit of the returned RealType will be convertible with the unit argument but might not equal it.
        Parameters:
        name - The name for the RealType.
        attrMask - The attribute mask for the RealType.
        Returns:
        A RealType corresponding to the input arguments or null.
        Throws:
        java.lang.NullPointerException - if the name is null.
      • getRealType

        public static RealType getRealType(java.lang.String name,
                                           Unit u,
                                           Set set)
        Returns a RealType corresponding to a name, unit, and representational set. If a RealType with the given name doesn't exist, then it's created (with a default attribute mask) and returned; otherwise, the previously existing RealType is returned if it is compatible with the input arguments (the attribute mask is ignored in the comparison); otherwise null is returned. Note that the unit of the returned RealType will be convertible with the unit argument but might not equal it.
        Parameters:
        name - The name for the RealType.
        u - The unit for the RealType.
        set - The representational set for the RealType.
        Returns:
        A RealType corresponding to the input arguments or null.
        Throws:
        java.lang.NullPointerException - if the name is null.
      • getRealType

        public static final RealType getRealType(java.lang.String name,
                                                 Unit u,
                                                 int attrMask)
        Returns a RealType corresponding to a name, unit, and attribute mask. If a RealType with the given name doesn't exist, then it's created (with a default representational set) and returned; otherwise, the previously existing RealType is returned if it is compatible with the input arguments (the representational set is ignored in the comparison); otherwise null is returned. Note that the unit of the returned RealType will be convertible with the unit argument but might not equal it.
        Parameters:
        name - The name for the RealType.
        u - The unit for the RealType.
        attrMask - The attribute mask for the RealType.
        Returns:
        A RealType corresponding to the input arguments or null.
        Throws:
        java.lang.NullPointerException - if the name is null.
      • getRealType

        public static final RealType getRealType(java.lang.String name,
                                                 Unit u,
                                                 Set set,
                                                 int attrMask)
        Returns a RealType corresponding to a name, unit, representational set, and attribute mask. If a RealType with the given name doesn't exist, then it's created and returned; otherwise, the previously existing RealType is returned if it is compatible with the input arguments; otherwise null is returned. Note that the unit of the returned RealType will be convertible with the unit argument but might not equal it.
        Parameters:
        name - The name for the RealType.
        u - The unit for the RealType.
        set - The representational set for the RealType.
        attrMask - The attribute mask for the RealType.
        Returns:
        A RealType corresponding to the input arguments or null.
        Throws:
        java.lang.NullPointerException - if the name is null.
      • getRealTypeByName

        public static RealType getRealTypeByName(java.lang.String name)
        return any RealType constructed in this JVM with name, or null
      • prettyString

        public java.lang.String prettyString(int indent)
        Specified by:
        prettyString in class MathType

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.