JNISpice
version 2.0.0

spice.basic
Class KernelVarStringComponent

java.lang.Object
  extended by spice.basic.KernelVarStringComponent

public class KernelVarStringComponent
extends java.lang.Object

Class KernelVarStringComponent represents components of continued string values associated with kernel variables.

This class is used by JNISpice to package components of continued kernel pool string variables and corresponding "found" flags. User applications normally will not need to construct instances of this class.

This class supports fetching string components using a "found flag," as opposed to using the exception handling system to respond to an attempt to fetch a non-existent component.

Version 1.0.0 08-JAN-2010 (NJB)


Constructor Summary
KernelVarStringComponent(java.lang.String kervarName, int index, java.lang.String componentValue, boolean found)
          Create a KernelVarStringComponent from a string and a boolean value indicating whether the requested component was found.
 
Method Summary
 java.lang.String getComponent()
          Return the String component from this instance.
 int getIndex()
          Return the index at which this component resides, if the component exists.
 java.lang.String getKerVarName()
          Return the name of the kernel variable to which this component belongs.
 boolean wasFound()
          Indicate whether the component associated with this instance exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KernelVarStringComponent

public KernelVarStringComponent(java.lang.String kervarName,
                                int index,
                                java.lang.String componentValue,
                                boolean found)
Create a KernelVarStringComponent from a string and a boolean value indicating whether the requested component was found.

Method Detail

wasFound

public boolean wasFound()
Indicate whether the component associated with this instance exists. Normally user applications should call this method to verify the existence of a kernel variable string component before attempting to retrieve the component.


getComponent

public java.lang.String getComponent()
                              throws SpiceException
Return the String component from this instance. This method should only be called after confirming the existence of the component.

Throws:
SpiceException

getKerVarName

public java.lang.String getKerVarName()
Return the name of the kernel variable to which this component belongs.


getIndex

public int getIndex()
Return the index at which this component resides, if the component exists. This index is that supplied by the caller of the constructor that created this instance; it doesn't necessarily corresponding to an extant kernel variable component.


JNISpice
version 2.0.0

JNISpice Alpha Test Version 2.0.0 28-JAN-2017 (NJB)