Package sfs2x.client.entities.variables
Class BaseVariable
- java.lang.Object
-
- sfs2x.client.entities.variables.BaseVariable
-
- All Implemented Interfaces:
Variable
- Direct Known Subclasses:
MMOItemVariable,SFSBuddyVariable,SFSRoomVariable,SFSUserVariable
public class BaseVariable extends java.lang.Object implements Variable
-
-
Constructor Summary
Constructors Constructor Description BaseVariable(java.lang.String name, java.lang.Object val)BaseVariable(java.lang.String name, java.lang.Object value, int type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleangetBoolValue()Get the value of the variable as Booleanjava.lang.DoublegetDoubleValue()Get the value of the variable as Doublejava.lang.IntegergetIntValue()Get the value of the variable as Integerjava.lang.StringgetName()Return the name of the variablecom.smartfoxserver.v2.entities.data.ISFSArraygetSFSArrayValue()Get the value of the variable as SFSArraycom.smartfoxserver.v2.entities.data.ISFSObjectgetSFSObjectValue()Get the value of the variable as SFSObjectjava.lang.StringgetStringValue()Get the value of the variable as StringintgetType()Return the data type of the variablejava.lang.ObjectgetValue()Get the value of the variable as ObjectbooleanisNull()Test if a variable is nullcom.smartfoxserver.v2.entities.data.ISFSArraytoSFSArray()Private
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Return the name of the variable
-
getType
public int getType()
Return the data type of the variable
-
getValue
public java.lang.Object getValue()
Get the value of the variable as Object
-
getBoolValue
public java.lang.Boolean getBoolValue()
Get the value of the variable as Boolean- Specified by:
getBoolValuein interfaceVariable- Returns:
- the value of the variable as Boolean
-
getIntValue
public java.lang.Integer getIntValue()
Get the value of the variable as Integer- Specified by:
getIntValuein interfaceVariable- Returns:
- the value of the variable as Integer
-
getDoubleValue
public java.lang.Double getDoubleValue()
Get the value of the variable as Double- Specified by:
getDoubleValuein interfaceVariable- Returns:
- the value of the variable as Double
-
getStringValue
public java.lang.String getStringValue()
Get the value of the variable as String- Specified by:
getStringValuein interfaceVariable- Returns:
- the value of the variable as String
-
getSFSObjectValue
public com.smartfoxserver.v2.entities.data.ISFSObject getSFSObjectValue()
Get the value of the variable as SFSObject- Specified by:
getSFSObjectValuein interfaceVariable- Returns:
- the value of the variable as SFSObject
-
getSFSArrayValue
public com.smartfoxserver.v2.entities.data.ISFSArray getSFSArrayValue()
Get the value of the variable as SFSArray- Specified by:
getSFSArrayValuein interfaceVariable- Returns:
- the value of the variable as SFSArray
-
isNull
public boolean isNull()
Test if a variable is null
-
toSFSArray
public com.smartfoxserver.v2.entities.data.ISFSArray toSFSArray()
Description copied from interface:VariablePrivate- Specified by:
toSFSArrayin interfaceVariable
-
-