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.Boolean
getBoolValue()
Get the value of the variable as Booleanjava.lang.Double
getDoubleValue()
Get the value of the variable as Doublejava.lang.Integer
getIntValue()
Get the value of the variable as Integerjava.lang.String
getName()
Return the name of the variablecom.smartfoxserver.v2.entities.data.ISFSArray
getSFSArrayValue()
Get the value of the variable as SFSArraycom.smartfoxserver.v2.entities.data.ISFSObject
getSFSObjectValue()
Get the value of the variable as SFSObjectjava.lang.String
getStringValue()
Get the value of the variable as Stringint
getType()
Return the data type of the variablejava.lang.Object
getValue()
Get the value of the variable as Objectboolean
isNull()
Test if a variable is nullcom.smartfoxserver.v2.entities.data.ISFSArray
toSFSArray()
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:
getBoolValue
in 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:
getIntValue
in 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:
getDoubleValue
in 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:
getStringValue
in 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:
getSFSObjectValue
in 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:
getSFSArrayValue
in 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:Variable
Private- Specified by:
toSFSArray
in interfaceVariable
-
-