Package opendap.dap
Class DFloat64
- java.lang.Object
-
- opendap.dap.DAPNode
-
- opendap.dap.BaseType
-
- opendap.dap.DPrimitive
-
- opendap.dap.DFloat64
-
- All Implemented Interfaces:
Serializable,Cloneable,ClientIO
public class DFloat64 extends DPrimitive implements ClientIO
Holds a OPeNDAPFloat64value.- See Also:
BaseType, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class opendap.dap.DAPNode
DAPNode.CloneMap
-
-
Field Summary
-
Fields inherited from class opendap.dap.DAPNode
_nameClear, _nameEncoded, log
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeserialize(DataInputStream source, ServerVersion sv, StatusUI statusUI)Reads data from aDataInputStream.voidexternalize(DataOutputStream sink)Writes data to aDataOutputStream.StringgetTypeName()Returns the OPeNDAP type name of the class instance as aString.doublegetValue()Get the current value as a double.PrimitiveVectornewPrimitiveVector()Constructs a newFloat64PrimitiveVector.voidprintVal(PrintWriter os, String space, boolean print_decl_p)Prints the value of the variable, with its declaration.voidsetValue(double newVal)Set the current value.-
Methods inherited from class opendap.dap.BaseType
addAttributeAlias, addAttributeContainer, appendAttribute, appendAttribute, appendAttributeContainer, checkSemantics, checkSemantics, cloneDAG, delAttribute, delAttribute, elementCount, elementCount, getAttribute, getAttribute, getAttributeNames, getAttributeTable, getLongName, hasAttributes, printAttributes, printAttributes, printAttributes, printAttributes, printConstraint, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printVal, printVal, printVal, printXML, printXML, printXML, printXML, printXML, setClearName
-
Methods inherited from class opendap.dap.DAPNode
clone, cloneDAG, getClearName, getEncodedName, getParent, isProject, setEncodedName, setParent, setProject, setProject, setProjected
-
-
-
-
Constructor Detail
-
DFloat64
public DFloat64()
Constructs a newDFloat64.
-
DFloat64
public DFloat64(String n)
Constructs a newDFloat64with namen.- Parameters:
n- the name of the variable.
-
-
Method Detail
-
getValue
public final double getValue()
Get the current value as a double.- Returns:
- the current value.
-
setValue
public final void setValue(double newVal)
Set the current value.- Parameters:
newVal- the new value.
-
newPrimitiveVector
public PrimitiveVector newPrimitiveVector()
Constructs a newFloat64PrimitiveVector.- Overrides:
newPrimitiveVectorin classBaseType- Returns:
- a new
Float64PrimitiveVector.
-
getTypeName
public String getTypeName()
Returns the OPeNDAP type name of the class instance as aString.- Specified by:
getTypeNamein classBaseType- Returns:
- the OPeNDAP type name of the class instance as a
String.
-
printVal
public void printVal(PrintWriter os, String space, boolean print_decl_p)
Prints the value of the variable, with its declaration. This function is primarily intended for debugging OPeNDAP applications and text-based clients such as geturl.- Specified by:
printValin classBaseType- Parameters:
os- thePrintWriteron which to print the value.space- this value is passed to theprintDeclmethod, and controls the leading spaces of the output.print_decl_p- a boolean value controlling whether the variable declaration is printed as well as the value.- See Also:
BaseType.printVal(PrintWriter, String, boolean)
-
deserialize
public void deserialize(DataInputStream source, ServerVersion sv, StatusUI statusUI) throws IOException, EOFException
Reads data from aDataInputStream. This method is only used on the client side of the OPeNDAP client/server connection.- Specified by:
deserializein interfaceClientIO- Parameters:
source- aDataInputStreamto read from.sv- theServerVersionreturned by the server.statusUI- theStatusUIobject to use for GUI updates and user cancellation notification (may be null).- Throws:
EOFException- if EOF is found before the variable is completely deserialized.IOException- thrown on any other InputStream exception.- See Also:
ClientIO.deserialize(DataInputStream, ServerVersion, StatusUI)
-
externalize
public void externalize(DataOutputStream sink) throws IOException
Writes data to aDataOutputStream. This method is used primarily by GUI clients which need to download OPeNDAP data, manipulate it, and then re-save it as a binary file.- Specified by:
externalizein interfaceClientIO- Parameters:
sink- aDataOutputStreamto write to.- Throws:
IOException- thrown on anyOutputStreamexception.
-
-