Interface Variable
- All Superinterfaces:
Cloneable
- All Known Subinterfaces:
BuddyVariable,IMMOItemVariable,RoomVariable,UserVariable
- All Known Implementing Classes:
com.smartfoxserver.entities.variables.BaseVariable,MMOItemVariable,SFSBuddyVariable,SFSRoomVariable,SFSUserVariable
Top level interface common to all 'variable' types in SmartfoxServer, such as
RoomVariable, UserVariable, BuddyVariable, MMOItemVariable-
Method Summary
Modifier and TypeMethodDescriptionGet the value of the variable as BooleanGet the value of the variable as ByteGet the value of the variable as DoubleGet the value of the variable as FloatGet the value of the variable as IntegerGet the value of the variable as LonggetName()Get the value of the variable as SFSArrayGet the value of the variable as SFSObjectGet the value of the variable as ShortGet the value of the variable as StringgetType()Return the data type of the variablegetValue()Get the value of the variable as ObjectGet the value of the variable as Vector2Get the value of the variable as Vector3booleanisNull()Test if a variable is null
-
Method Details
-
getName
String getName() -
getType
VariableType getType()Return the data type of the variable- Returns:
- the data type of the variable
- See Also:
-
getValue
Object getValue()Get the value of the variable as Object- Returns:
- the value of the variable
-
getBoolValue
Boolean getBoolValue()Get the value of the variable as Boolean- Returns:
- the value of the variable
-
getByteValue
Byte getByteValue()Get the value of the variable as Byte- Returns:
- the value of the variable
-
getShortValue
Short getShortValue()Get the value of the variable as Short- Returns:
- the value of the variable
-
getIntValue
Integer getIntValue()Get the value of the variable as Integer- Returns:
- the value of the variable
-
getLongValue
Long getLongValue()Get the value of the variable as Long- Returns:
- the value of the variable
-
getFloatValue
Float getFloatValue()Get the value of the variable as Float- Returns:
- the value of the variable
-
getDoubleValue
Double getDoubleValue()Get the value of the variable as Double- Returns:
- the value of the variable
-
getStringValue
String getStringValue()Get the value of the variable as String- Returns:
- the value of the variable
-
getSFSObjectValue
ISFSObject getSFSObjectValue()Get the value of the variable as SFSObject- Returns:
- the value of the variable
-
getSFSArrayValue
ISFSArray getSFSArrayValue()Get the value of the variable as SFSArray- Returns:
- the value of the variable
-
getVector2Value
SFSVector2 getVector2Value()Get the value of the variable as Vector2- Returns:
- the value of the variable
-
getVector3Value
SFSVector3 getVector3Value()Get the value of the variable as Vector3- Returns:
- the value of the variable
-
isNull
boolean isNull()Test if a variable is null- Returns:
- true if the variable is null
-
toSFSArray
ISFSArray toSFSArray()- Internal
-