Package sfs3.client.entities.variables
Class BaseVariable
java.lang.Object
sfs3.client.entities.variables.BaseVariable
- All Implemented Interfaces:
Variable
- Direct Known Subclasses:
MMOItemVariable,SFSBuddyVariable,SFSRoomVariable,SFSUserVariable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBaseVariable(String name, Object val) BaseVariable(String name, Object value, VariableType type) -
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()Return the name of the variableGet the value of the variable as SFSArrayGet the value of the variable as SFSObjectGet the value of the variable as SFSVector2Get the value of the variable as SFSVector3Get 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 ObjectbooleanisNull()Test if a variable is nullprotected voidprotected voidPrivatetoString()
-
Field Details
-
name
-
type
-
val
-
-
Constructor Details
-
BaseVariable
-
BaseVariable
-
-
Method Details
-
getName
Return the name of the variable -
getType
Return the data type of the variable -
getValue
Get the value of the variable as Object -
getBoolValue
Get the value of the variable as Boolean- Specified by:
getBoolValuein interfaceVariable- Returns:
- the value of the variable as Boolean
-
getByteValue
Get the value of the variable as Byte- Specified by:
getByteValuein interfaceVariable- Returns:
- the value of the variable as Byte
-
getShortValue
Get the value of the variable as Short- Specified by:
getShortValuein interfaceVariable- Returns:
- the value of the variable as Short
-
getIntValue
Get the value of the variable as Integer- Specified by:
getIntValuein interfaceVariable- Returns:
- the value of the variable as Integer
-
getLongValue
Get the value of the variable as Long- Specified by:
getLongValuein interfaceVariable- Returns:
- the value of the variable as Long
-
getFloatValue
Get the value of the variable as Float- Specified by:
getFloatValuein interfaceVariable- Returns:
- the value of the variable as Float
-
getDoubleValue
Get the value of the variable as Double- Specified by:
getDoubleValuein interfaceVariable- Returns:
- the value of the variable as Double
-
getStringValue
Get the value of the variable as String- Specified by:
getStringValuein interfaceVariable- Returns:
- the value of the variable as String
-
getSFSObjectValue
Get the value of the variable as SFSObject- Specified by:
getSFSObjectValuein interfaceVariable- Returns:
- the value of the variable as SFSObject
-
getSFSArrayValue
Get the value of the variable as SFSArray- Specified by:
getSFSArrayValuein interfaceVariable- Returns:
- the value of the variable as SFSArray
-
getSFSVector2Value
Get the value of the variable as SFSVector2- Specified by:
getSFSVector2Valuein interfaceVariable- Returns:
- the value of the variable as SFSVector2
-
getSFSVector3Value
Get the value of the variable as SFSVector3- Specified by:
getSFSVector3Valuein interfaceVariable- Returns:
- the value of the variable as SFSVector3
-
isNull
public boolean isNull()Test if a variable is null -
toSFSArray
Description copied from interface:VariablePrivate- Specified by:
toSFSArrayin interfaceVariable
-
populateArrayWithValue
-
setValue
-
toString
-