Documentation of 'visad.DoubleTuple' Java class
DoubleTuple
visad

Class DoubleTuple

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Data, RealTupleIface, Thing, TupleIface


    public class DoubleTuple
    extends RealTuple
    This provides a LoCal RealTuple that can hold numeric values without taking the hit that having lots and lots of Real objects around.
    See Also:
    Serialized Form
    • Constructor Detail

      • DoubleTuple

        public DoubleTuple(double[] doubles)
                    throws VisADException
        Construct a new DoubleTuple of generic values
        Parameters:
        doubles - the values
        Throws:
        VisADException - problem creating MathType
      • DoubleTuple

        public DoubleTuple(RealTupleType type,
                           double[] doubles)
        Construct a new DoubleTuple
        Parameters:
        type - The type
        doubles - The reals
      • DoubleTuple

        public DoubleTuple(RealTupleType type,
                           double[] doubles,
                           Unit[] units)
        Construct a new DoubleTuple
        Parameters:
        type - The type
        doubles - The reals
        units - The units for the reals (may be null)
      • DoubleTuple

        public DoubleTuple(RealTupleType type,
                           Data[] prototypes,
                           double[] doubles,
                           Unit[] units)
    • Method Detail

      • isMissing

        public boolean isMissing()
        Check if there is no Data in this Tuple.
        Specified by:
        isMissing in interface Data
        Specified by:
        isMissing in interface TupleIface
        Overrides:
        isMissing in class Tuple
        Returns:
        true if there is no data.
      • getComponent

        public Data getComponent(int i)
                          throws VisADException,
                                 java.rmi.RemoteException
        Get the i'th component. This creates it if needed and stores it in the components array
        Specified by:
        getComponent in interface TupleIface
        Overrides:
        getComponent in class Tuple
        Parameters:
        i - Which one
        Returns:
        The component
        Throws:
        java.rmi.RemoteException - On badness
        VisADException - On badness
      • getComponents

        public Data[] getComponents(boolean copy)
        Create, if needed, and return the component array.
        Overrides:
        getComponents in class Tuple
        Parameters:
        copy - if true then return a copy of the tuple array. Else return the actual array
        Returns:
        components
      • getValues

        public double[] getValues()
        Get the values of the Real components
        Specified by:
        getValues in interface RealTupleIface
        Overrides:
        getValues in class RealTuple
        Returns:
        double array of the values of each Real component
      • equals

        public boolean equals(java.lang.Object obj)
        Indicates if this Tuple is identical to an object.
        Overrides:
        equals in class Tuple
        Parameters:
        obj - The object.
        Returns:
        true if and only if the object is a Tuple and both Tuple-s have identical component sequences.
      • hashCode

        public int hashCode()
        Returns the hash code of this object.
        Overrides:
        hashCode in class Tuple
        Returns:
        The hash code of this object.
      • main

        public static void main(java.lang.String[] args)
                         throws VisADException,
                                java.rmi.RemoteException
        run 'java visad.DoubleTuple' to test the RealTuple class
        Parameters:
        args - ignored
        Throws:
        java.rmi.RemoteException - Java RMI problem
        VisADException - Unable to create the VisAD objects

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.