de.aitools.aq.value.quadruple
Class DoubleDoubleIntInt

java.lang.Object
  extended by de.aitools.aq.value.Value
      extended by de.aitools.aq.value.quadruple.DoubleDoubleIntInt

public class DoubleDoubleIntInt
extends Value

Version:
$Id: DoubleDoubleIntInt.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
DoubleDoubleIntInt()
           
DoubleDoubleIntInt(DoubleDoubleIntInt value)
           
DoubleDoubleIntInt(double e1, double e2, int e3, int e4)
           
 
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)
           
 double getE1()
           
 double getE2()
           
 int getE3()
           
 int getE4()
           
 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(double e1, double e2, int e3, int e4)
           
 void setE1(double e1)
           
 void setE2(double e2)
           
 void setE3(int e3)
           
 void setE4(int e4)
           
 
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

DoubleDoubleIntInt

public DoubleDoubleIntInt()

DoubleDoubleIntInt

public DoubleDoubleIntInt(double e1,
                          double e2,
                          int e3,
                          int e4)

DoubleDoubleIntInt

public DoubleDoubleIntInt(DoubleDoubleIntInt 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 double getE1()

getE2

public double getE2()

getE3

public int getE3()

getE4

public int getE4()

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(double e1)

setE2

public void setE2(double e2)

setE3

public void setE3(int e3)

setE4

public void setE4(int e4)

set

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

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