org.ros.internal.message
Class Field

java.lang.Object
  extended by org.ros.internal.message.Field
Direct Known Subclasses:
ListField

public abstract class Field
extends java.lang.Object


Field Summary
protected  boolean isConstant
           
protected  java.lang.String name
           
protected  FieldType type
           
 
Constructor Summary
protected Field(FieldType type, java.lang.String name, boolean isConstant)
           
 
Method Summary
abstract  void deserialize(java.nio.ByteBuffer buffer)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getGetterName()
           
 java.lang.String getMd5String()
           
 java.lang.String getName()
           
abstract  int getSerializedSize()
           
 java.lang.String getSetterName()
           
 FieldType getType()
           
abstract
<T> T
getValue()
           
 int hashCode()
           
 boolean isConstant()
           
abstract  void serialize(java.nio.ByteBuffer buffer)
           
abstract  void setValue(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected final FieldType type

name

protected final java.lang.String name

isConstant

protected final boolean isConstant
Constructor Detail

Field

protected Field(FieldType type,
                java.lang.String name,
                boolean isConstant)
Method Detail

getName

public java.lang.String getName()
Returns:
the name

getType

public FieldType getType()
Returns:
the type

isConstant

public boolean isConstant()
Returns:
true if this ListField represents a constant

getGetterName

public java.lang.String getGetterName()

getSetterName

public java.lang.String getSetterName()

getMd5String

public java.lang.String getMd5String()
Returns:
the textual representation of this field used for computing the MD5 of a message definition

getSerializedSize

public abstract int getSerializedSize()

serialize

public abstract void serialize(java.nio.ByteBuffer buffer)

deserialize

public abstract void deserialize(java.nio.ByteBuffer buffer)

getValue

public abstract <T> T getValue()

setValue

public abstract void setValue(java.lang.Object value)

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