it.gotoandplay.smartfoxserver.data
Class UserVariable
java.lang.Object
it.gotoandplay.smartfoxserver.data.UserVariable
- Direct Known Subclasses:
- RoomVariable
public class UserVariable
- extends java.lang.Object
The UserVariable object holds custom user data which is auto-updated between all clients in the same room(s).
You can learn more about user variables by following this tutorial.
- Author:
- (c) 2004-2007 gotoAndPlay() -- www.gotoandplay.it
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_NULL
public static java.lang.String TYPE_NULL
TYPE_BOOLEAN
public static java.lang.String TYPE_BOOLEAN
TYPE_NUMBER
public static java.lang.String TYPE_NUMBER
TYPE_STRING
public static java.lang.String TYPE_STRING
UserVariable
public UserVariable(java.lang.String value,
java.lang.String type)
- Deprecated.
- Default constructor
- Parameters:
value - var valuetype - var type
UserVariable
public UserVariable(java.lang.String value)
UserVariable
public UserVariable(int value)
UserVariable
public UserVariable(double value)
UserVariable
public UserVariable(boolean value)
setType
public void setType(java.lang.String type)
- Set the variable type
- Parameters:
type - the type
getType
public java.lang.String getType()
- Returns:
- the variable type
setValue
public void setValue(java.lang.String value,
java.lang.String type)
setValue
public void setValue(java.lang.String value)
- Set the variable value
- Parameters:
value - the value
setValue
public void setValue(int value)
setValue
public void setValue(double value)
setValue
public void setValue(boolean value)
getValue
public java.lang.String getValue()
- Returns:
- the variable value
getIntValue
public int getIntValue()
getDoubleValue
public double getDoubleValue()
getBooleanValue
public boolean getBooleanValue()