de.aitools.aq.value.pair
Class IntString

java.lang.Object
  extended by de.aitools.aq.value.Value
      extended by de.aitools.aq.value.pair.IntString

public class IntString
extends Value


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
IntString()
           
IntString(IntString value)
           
IntString(int e1, java.lang.String e2)
           
 
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()
           
 java.lang.String getE2()
           
 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 stream)
          Prints all elements of that value to a stream in a human-readable format.
 void set(int e1, java.lang.String e2)
           
 void setE1(int e1)
           
 void setE2(java.lang.String e2)
           
 
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

IntString

public IntString()

IntString

public IntString(int e1,
                 java.lang.String e2)

IntString

public IntString(IntString value)
Method Detail

getE1

public int getE1()

setE1

public void setE1(int e1)

getE2

public java.lang.String getE2()

setE2

public void setE2(java.lang.String e2)

set

public void set(int e1,
                java.lang.String e2)

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

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 stream)
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:
stream - a stream to print all elements to

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