de.aitools.aq.value.triple
Class IntDoubleDouble

java.lang.Object
  extended by de.aitools.aq.value.Value
      extended by de.aitools.aq.value.triple.IntDoubleDouble

public class IntDoubleDouble
extends Value

Version:
$Id: IntDoubleDouble.java,v 1.6 2011/04/08 17:25:55 trenkman Exp $
Author:
martin.trenkmann@uni-weimar.de

Field Summary
static int NATIVE_TYPE_ID
           
 
Fields inherited from class de.aitools.aq.value.Value
DELIMITER_C, DELIMITER_S, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_SHORT
 
Constructor Summary
IntDoubleDouble()
           
IntDoubleDouble(IntDoubleDouble value)
           
IntDoubleDouble(int e1, double e2, double e3)
           
 
Method Summary
 void copyFrom(com.sun.jna.Pointer buffer)
          Reads all elements of that value from a piece of memory pointed to by buffer.
 void copyTo(com.sun.jna.Pointer buffer)
          Writes all elements of that value to a piece of memory pointed to by buffer.
 boolean equals(java.lang.Object obj)
           
 int getE1()
           
 double getE2()
           
 double getE3()
           
 int getSerializedSize()
          Returns the size in bytes of this object when serialized.
 com.sun.jna.Memory getSharedMemory()
          Returns a pointer to a piece of memory, that provides space for at least Value.getSerializedSize() bytes and can be directly used in conjunction with Value.copyTo(Pointer) and Value.copyFrom(Pointer).
 int hashCode()
           
 boolean parseFrom(java.util.Scanner sc)
          Parses new content of that value from the given Scanner.
 java.io.PrintStream printTo(java.io.PrintStream ps)
          Prints all elements of that value to a stream in a human-readable format.
 void set(int e1, double e2, double e3)
           
 void setE1(int e1)
           
 void setE2(double e2)
           
 void setE3(double e3)
           
 
Methods inherited from class de.aitools.aq.value.Value
getNativeTypeId
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NATIVE_TYPE_ID

public static final int NATIVE_TYPE_ID
See Also:
Constant Field Values
Constructor Detail

IntDoubleDouble

public IntDoubleDouble()

IntDoubleDouble

public IntDoubleDouble(int e1,
                       double e2,
                       double e3)

IntDoubleDouble

public IntDoubleDouble(IntDoubleDouble value)
Method Detail

copyFrom

public void copyFrom(com.sun.jna.Pointer buffer)
Description copied from class: Value
Reads all elements of that value from a piece of memory pointed to by buffer. You have to make sure, that the size of this buffer is at least Value.getSerializedSize().

Specified by:
copyFrom in class Value
Parameters:
buffer - a pointer to free memory

copyTo

public void copyTo(com.sun.jna.Pointer buffer)
Description copied from class: Value
Writes all elements of that value to a piece of memory pointed to by buffer. You have to make sure, that the size of this buffer is at least Value.getSerializedSize().

Specified by:
copyTo in class Value
Parameters:
buffer - a pointer to free memory

getE1

public int getE1()

getE2

public double getE2()

getE3

public double getE3()

parseFrom

public boolean parseFrom(java.util.Scanner sc)
Description copied from class: Value
Parses new content of that value from the given Scanner.

Specified by:
parseFrom in class Value
Parameters:
sc - a Scanner to parse the data from
Returns:
true if on success, false otherwise.

printTo

public java.io.PrintStream printTo(java.io.PrintStream ps)
Description copied from class: Value
Prints all elements of that value to a stream in a human-readable format.

Specified by:
printTo in class Value
Parameters:
ps - a stream to print all elements to

setE1

public void setE1(int e1)

setE2

public void setE2(double e2)

setE3

public void setE3(double e3)

set

public void set(int e1,
                double e2,
                double e3)

getSharedMemory

public com.sun.jna.Memory getSharedMemory()
Description copied from class: Value

Returns a pointer to a piece of memory, that provides space for at least Value.getSerializedSize() bytes and can be directly used in conjunction with Value.copyTo(Pointer) and Value.copyFrom(Pointer).

For the sake of efficiency the provided memory may be some sort of shared memory, which can be used temporarily, to transfer data somewhere, e.g. to native code. Please note that the usage of this buffer in multi-threaded code has to be synchronized.

Specified by:
getSharedMemory in class Value
Returns:
a pointer to some shared memory, which is large enough to serialize this object to
See Also:
Value.copyFrom(Pointer), Value.copyTo(Pointer), Value.getSerializedSize()

getSerializedSize

public int getSerializedSize()
Description copied from class: Value
Returns the size in bytes of this object when serialized.

Specified by:
getSerializedSize in class Value
Returns:
the size in bytes

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object