Class BaseVariable

java.lang.Object
sfs3.client.entities.variables.BaseVariable
All Implemented Interfaces:
Variable
Direct Known Subclasses:
MMOItemVariable, SFSBuddyVariable, SFSRoomVariable, SFSUserVariable

public class BaseVariable extends Object implements Variable
  • Field Details

  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Return the name of the variable
      Specified by:
      getName in interface Variable
      Returns:
      the variable's name
    • getType

      public VariableType getType()
      Return the data type of the variable
      Specified by:
      getType in interface Variable
      Returns:
      the data type of the variable
    • getValue

      public Object getValue()
      Get the value of the variable as Object
      Specified by:
      getValue in interface Variable
      Returns:
      the value of the variable as Object
    • getBoolValue

      public Boolean getBoolValue()
      Get the value of the variable as Boolean
      Specified by:
      getBoolValue in interface Variable
      Returns:
      the value of the variable as Boolean
    • getByteValue

      public Byte getByteValue()
      Get the value of the variable as Byte
      Specified by:
      getByteValue in interface Variable
      Returns:
      the value of the variable as Byte
    • getShortValue

      public Short getShortValue()
      Get the value of the variable as Short
      Specified by:
      getShortValue in interface Variable
      Returns:
      the value of the variable as Short
    • getIntValue

      public Integer getIntValue()
      Get the value of the variable as Integer
      Specified by:
      getIntValue in interface Variable
      Returns:
      the value of the variable as Integer
    • getLongValue

      public Long getLongValue()
      Get the value of the variable as Long
      Specified by:
      getLongValue in interface Variable
      Returns:
      the value of the variable as Long
    • getFloatValue

      public Float getFloatValue()
      Get the value of the variable as Float
      Specified by:
      getFloatValue in interface Variable
      Returns:
      the value of the variable as Float
    • getDoubleValue

      public Double getDoubleValue()
      Get the value of the variable as Double
      Specified by:
      getDoubleValue in interface Variable
      Returns:
      the value of the variable as Double
    • getStringValue

      public String getStringValue()
      Get the value of the variable as String
      Specified by:
      getStringValue in interface Variable
      Returns:
      the value of the variable as String
    • getSFSObjectValue

      public ISFSObject getSFSObjectValue()
      Get the value of the variable as SFSObject
      Specified by:
      getSFSObjectValue in interface Variable
      Returns:
      the value of the variable as SFSObject
    • getSFSArrayValue

      public ISFSArray getSFSArrayValue()
      Get the value of the variable as SFSArray
      Specified by:
      getSFSArrayValue in interface Variable
      Returns:
      the value of the variable as SFSArray
    • getSFSVector2Value

      public SFSVector2 getSFSVector2Value()
      Get the value of the variable as SFSVector2
      Specified by:
      getSFSVector2Value in interface Variable
      Returns:
      the value of the variable as SFSVector2
    • getSFSVector3Value

      public SFSVector3 getSFSVector3Value()
      Get the value of the variable as SFSVector3
      Specified by:
      getSFSVector3Value in interface Variable
      Returns:
      the value of the variable as SFSVector3
    • isNull

      public boolean isNull()
      Test if a variable is null
      Specified by:
      isNull in interface Variable
      Returns:
      true if the variable is null
    • toSFSArray

      public ISFSArray toSFSArray()
      Description copied from interface: Variable
      Private
      Specified by:
      toSFSArray in interface Variable
    • populateArrayWithValue

      protected void populateArrayWithValue(ISFSArray arr)
    • setValue

      protected void setValue(Object val)
    • toString

      public String toString()
      Overrides:
      toString in class Object