public abstract class Variable extends Object
Constructor and Description |
---|
Variable() |
Variable(long expirationTime) |
Modifier and Type | Method and Description |
---|---|
abstract Object |
get()
Gets the value of this variable.
|
static Variable |
ofType(VariableType type,
Object value) |
static Variable |
ofType(VariableType type,
Object value,
boolean save) |
static Variable |
ofType(VariableType type,
Object value,
long expire) |
boolean |
shouldExpire() |
boolean |
shouldSave() |
static Variable |
toType(Variable var,
VariableType type) |
public Variable()
public Variable(long expirationTime)
expirationTime
- The time in milliseconds when the variable should expire, or 0 if it should never expire.public boolean shouldExpire()
public boolean shouldSave()
public abstract Object get()
public static Variable ofType(VariableType type, Object value)
public static Variable ofType(VariableType type, Object value, boolean save)
public static Variable ofType(VariableType type, Object value, long expire)
public static Variable toType(Variable var, VariableType type)
Copyright © 2020. All rights reserved.