|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.content.abs.AbsPrimitive
public class AbsPrimitive
An abstract descriptor that can hold a primitive expression.
| Field Summary |
|---|
| Fields inherited from interface jade.content.abs.AbsObject |
|---|
ABS_AGENT_ACTION, ABS_AGGREGATE, ABS_CONCEPT, ABS_CONCEPT_SLOT_FUNCTION, ABS_CONTENT_ELEMENT_LIST, ABS_IRE, ABS_PREDICATE, ABS_PRIMITIVE, ABS_VARIABLE, UNKNOWN |
| Constructor Summary | |
|---|---|
AbsPrimitive(java.lang.String typeName)
Construct an Abstract descriptor to hold a primitive of the proper type (e.g. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
AbsObject |
getAbsObject(java.lang.String name)
Makes no sense in the case of an AbsPrimitive that has no attribute --> Just return null |
int |
getAbsType()
|
boolean |
getBoolean()
|
byte[] |
getByteSequence()
|
int |
getCount()
Makes no sense in the case of an AbsPrimitive that has no attribute --> Just return 0 |
java.util.Date |
getDate()
|
double |
getDouble()
|
float |
getFloat()
|
int |
getInteger()
|
long |
getLong()
|
java.lang.String[] |
getNames()
Makes no sense in the case of an AbsPrimitive that has no attribute --> Just return null |
java.lang.Object |
getObject()
|
java.lang.String |
getString()
|
java.lang.String |
getTypeName()
|
int |
hashCode()
|
boolean |
isGrounded()
Tests if this AbsPrimitive is grounded. |
void |
set(boolean value)
Set the value of this AbsPrimitive to the given boolean value. |
void |
set(byte[] value)
Set the value of this AbsPrimitive to the given byte[] value. |
void |
set(java.util.Date value)
Set the value of this AbsPrimitive to the given Date value. |
void |
set(double value)
Set the value of this AbsPrimitive to the given double value. |
void |
set(float value)
Set the value of this AbsPrimitive to the given float value. |
void |
set(int value)
Set the value of this AbsPrimitive to the given int value. |
void |
set(long value)
Set the value of this AbsPrimitive to the given long value. |
void |
set(java.lang.String value)
Set the value of this AbsPrimitive to the given String. |
java.lang.String |
toString()
|
static AbsPrimitive |
wrap(boolean value)
Create an AbsPrimitive of type BasicOntology.BOOLEAN
containing a given boolean value. |
static AbsPrimitive |
wrap(byte[] value)
Create an AbsPrimitive of type BasicOntology.BYTE_SEQUENCE
containing a given byte[] value. |
static AbsPrimitive |
wrap(java.util.Date value)
Create an AbsPrimitive of type BasicOntology.DATE
containing a given Date value. |
static AbsPrimitive |
wrap(double value)
Create an AbsPrimitive of type BasicOntology.FLOAT
containing a given double value. |
static AbsPrimitive |
wrap(float value)
Create an AbsPrimitive of type BasicOntology.FLOAT
containing a given float value. |
static AbsPrimitive |
wrap(int value)
Create an AbsPrimitive of type BasicOntology.INTEGER
containing a given int value. |
static AbsPrimitive |
wrap(long value)
Create an AbsPrimitive of type BasicOntology.INTEGER
containing a given long value. |
static AbsPrimitive |
wrap(java.lang.String value)
Create an AbsPrimitive of type BasicOntology.STRING
containing a given String value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbsPrimitive(java.lang.String typeName)
typeName - The name of the type of the primitive held by
this abstract descriptor.| Method Detail |
|---|
public static AbsPrimitive wrap(java.lang.String value)
BasicOntology.STRING
containing a given String value.
public static AbsPrimitive wrap(boolean value)
BasicOntology.BOOLEAN
containing a given boolean value.
public static AbsPrimitive wrap(int value)
BasicOntology.INTEGER
containing a given int value.
public static AbsPrimitive wrap(long value)
BasicOntology.INTEGER
containing a given long value.
public static AbsPrimitive wrap(float value)
BasicOntology.FLOAT
containing a given float value.
public static AbsPrimitive wrap(double value)
BasicOntology.FLOAT
containing a given double value.
public static AbsPrimitive wrap(java.util.Date value)
BasicOntology.DATE
containing a given Date value.
public static AbsPrimitive wrap(byte[] value)
BasicOntology.BYTE_SEQUENCE
containing a given byte[] value.
public void set(java.lang.String value)
value - The new value
java.lang.IllegalArgumentException - If the type of this AbsPrimitive
is not BasicOntology.STRINGpublic void set(boolean value)
value - The new value
java.lang.IllegalArgumentException - If the type of this AbsPrimitive
is not BasicOntology.BOOLEANpublic void set(int value)
value - The new value
java.lang.IllegalArgumentException - If the type of this AbsPrimitive
is not BasicOntology.INTEGERpublic void set(long value)
value - The new value
java.lang.IllegalArgumentException - If the type of this AbsPrimitive
is not BasicOntology.INTEGERpublic void set(float value)
value - The new value
java.lang.IllegalArgumentException - If the type of this AbsPrimitive
is not BasicOntology.FLOATpublic void set(double value)
value - The new value
java.lang.IllegalArgumentException - If the type of this AbsPrimitive
is not BasicOntology.FLOATpublic void set(java.util.Date value)
value - The new value
java.lang.IllegalArgumentException - If the type of this AbsPrimitive
is not BasicOntology.DATEpublic void set(byte[] value)
value - The new value
java.lang.IllegalArgumentException - If the type of this AbsPrimitive
is not BasicOntology.BYTE_SEQUENCEpublic java.lang.String getString()
java.lang.ClassCastException - If the type of this AbsPrimitive
is not BasicOntology.STRINGpublic boolean getBoolean()
java.lang.ClassCastException - If the type of this AbsPrimitive
is not BasicOntology.BOOLEANpublic int getInteger()
java.lang.ClassCastException - If the type of this AbsPrimitive
is not BasicOntology.INTEGERpublic long getLong()
java.lang.ClassCastException - If the type of this AbsPrimitive
is not BasicOntology.INTEGERpublic float getFloat()
java.lang.ClassCastException - If the type of this AbsPrimitive
is not BasicOntology.FLOATpublic double getDouble()
java.lang.ClassCastException - If the type of this AbsPrimitive
is not BasicOntology.FLOATpublic java.util.Date getDate()
java.lang.ClassCastException - If the type of this AbsPrimitive
is not BasicOntology.DATEpublic byte[] getByteSequence()
java.lang.ClassCastException - If the type of this AbsPrimitive
is not BasicOntology.BYTE_SEQUENCEpublic java.lang.Object getObject()
BasicOntology.BOOLEAN
BasicOntology.INTEGER or BasicOntology.FLOAT a
Boolean, Integer or Float object is returned.public java.lang.String getTypeName()
getTypeName in interface AbsObjectAbsObject.getTypeName()public AbsObject getAbsObject(java.lang.String name)
getAbsObject in interface AbsObjectname - The name of the attribute.
public java.lang.String[] getNames()
getNames in interface AbsObjectpublic boolean isGrounded()
isGrounded in interface AbsObjecttrue if the object is grounded.public int getCount()
getCount in interface AbsObjectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getAbsType()
getAbsType in interface AbsObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||