de.aitools.aq.value.quadruple
Class LongLongDoubleDouble

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

public class LongLongDoubleDouble
extends Value

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

LongLongDoubleDouble

public LongLongDoubleDouble()

LongLongDoubleDouble

public LongLongDoubleDouble(long e1,
                            long e2,
                            double e3,
                            double e4)

LongLongDoubleDouble

public LongLongDoubleDouble(LongLongDoubleDouble 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 long getE1()

getE2

public long getE2()

getE3

public double getE3()

getE4

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

setE2

public void setE2(long e2)

setE3

public void setE3(double e3)

setE4

public void setE4(double e4)

set

public void set(long e1,
                long e2,
                double e3,
                double 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