- java.lang.Object
-
- spice.basic.KernelVarDescriptor
-
public class KernelVarDescriptor extends java.lang.Object
Class KernelVarDescriptor packages attributes of kernel variables.Version 1.0.0 03-DEC-2009 (NJB)
-
-
Field Summary
Fields Modifier and Type Field Description static int
CHARACTER
static java.lang.String
CSPICE_CHARACTER
static java.lang.String
CSPICE_NUMERIC
private int
dataType
private boolean
exists
private java.lang.String
name
static int
NUMERIC
private int
size
-
Constructor Summary
Constructors Constructor Description KernelVarDescriptor()
Zero-arguments constructor.KernelVarDescriptor(boolean exists, java.lang.String name, int size, int dataType)
Construct a descriptor from a kernel variable's attributes.KernelVarDescriptor(KernelVarDescriptor descr)
Copy constructor.
-
Method Summary
Modifier and Type Method Description boolean
exists()
Return a boolean indicating whether a specified kernel variable exists (is present in the kernel pool).int
getDataType()
Return the data type of the kernel variable, if any, associated with this instance.This method throws an exception of the variable does not exist.java.lang.String
getName()
Return the name of the kernel variable associated with this instance.The variable need not exist in the kernel pool.int
getSize()
Return the size of the kernel variable, if any, associated with this instance.This method throws an exception of the variable does not exist.
-
-
-
Field Detail
-
CHARACTER
public static final int CHARACTER
- See Also:
- Constant Field Values
-
NUMERIC
public static final int NUMERIC
- See Also:
- Constant Field Values
-
CSPICE_CHARACTER
public static final java.lang.String CSPICE_CHARACTER
- See Also:
- Constant Field Values
-
CSPICE_NUMERIC
public static final java.lang.String CSPICE_NUMERIC
- See Also:
- Constant Field Values
-
exists
private boolean exists
-
name
private java.lang.String name
-
size
private int size
-
dataType
private int dataType
-
-
Constructor Detail
-
KernelVarDescriptor
public KernelVarDescriptor()
Zero-arguments constructor.
-
KernelVarDescriptor
public KernelVarDescriptor(KernelVarDescriptor descr)
Copy constructor.- Parameters:
descr
- KernelVarDescriptor
-
KernelVarDescriptor
public KernelVarDescriptor(boolean exists, java.lang.String name, int size, int dataType)
Construct a descriptor from a kernel variable's attributes.- Parameters:
exists
- booleandataType
- intname
- Stringsize
- int
-
-
Method Detail
-
exists
public boolean exists()
Return a boolean indicating whether a specified kernel variable exists (is present in the kernel pool).User applications should call this method to determine whether the variable's size and data type can be fetched.
- Returns:
- boolean
-
getName
public java.lang.String getName()
Return the name of the kernel variable associated with this instance.The variable need not exist in the kernel pool.- Returns:
- String
-
getSize
public int getSize() throws KernelVarNotFoundException
Return the size of the kernel variable, if any, associated with this instance.This method throws an exception of the variable does not exist.- Returns:
- int
- Throws:
KernelVarNotFoundException
- exception
-
getDataType
public int getDataType() throws KernelVarNotFoundException
Return the data type of the kernel variable, if any, associated with this instance.This method throws an exception of the variable does not exist.- Returns:
- int
- Throws:
KernelVarNotFoundException
- exception
-
-