com.stackmob.sdkapi
Class SMValue<T>
java.lang.Object
com.stackmob.sdkapi.SMValue<T>
- Type Parameters:
T - The type of this value, see subclasses for explicit types
- Direct Known Subclasses:
- SMCollection, SMObject, SMPrimitive, SMString
public abstract class SMValue<T>
- extends Object
An object representing a value stored in the StackMob datastore
|
Field Summary |
protected T |
value
|
|
Constructor Summary |
SMValue(T value)
Create a new SMValue |
value
protected final T value
SMValue
public SMValue(T value)
- Create a new SMValue
- Parameters:
value - the value of this SMValue
getValue
public T getValue()
- Get the stored value
- Returns:
- the value of this SMValue
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
isA
public <U extends SMValue> boolean isA(Class<U> cls)
asA
public <U extends SMValue> U asA(Class<U> cls)
throws CannotCastSMValueException
- Throws:
CannotCastSMValueException
Copyright © 2012 StackMob. All Rights Reserved.