public final class VariableReference extends Object implements Reference
Constructor and Description |
---|
VariableReference(Collection coll,
Collection.Key key)
constructor of the class
|
VariableReference(Collection coll,
String key)
constructor of the class
|
VariableReference(Object o,
Collection.Key key)
constructor of the class
|
VariableReference(Object o,
String key)
constructor of the class
|
Modifier and Type | Method and Description |
---|---|
Object |
get(PageContext pc) |
Object |
get(PageContext pc,
Object defaultValue) |
Collection |
getCollection() |
Collection.Key |
getKey() |
String |
getKeyAsString() |
Object |
getParent() |
Object |
remove(PageContext pc)
clears the variable from collection
|
Object |
removeEL(PageContext pc)
clears the variable from collection
|
void |
set(double value) |
Object |
set(PageContext pc,
Object value) |
Object |
setEL(PageContext pc,
Object value) |
String |
toString() |
Object |
touch(PageContext pc)
create it when not exist
|
Object |
touchEL(PageContext pc)
create it when not exist
|
public VariableReference(Collection coll, String key)
coll
- Collection where variable iskey
- key to the value inside the collectionpublic VariableReference(Collection coll, Collection.Key key)
coll
- Collection where variable iskey
- key to the value inside the collectionpublic VariableReference(Object o, String key) throws PageException
o
- Object will be casted to Collectionkey
- key to the value inside the collectionPageException
public VariableReference(Object o, Collection.Key key) throws PageException
o
- Object will be casted to Collectionkey
- key to the value inside the collectionPageException
public Object get(PageContext pc) throws PageException
get
in interface Reference
pc
- PageContext of the actuell RequestPageException
public Object get(PageContext pc, Object defaultValue)
public Object set(PageContext pc, Object value) throws PageException
set
in interface Reference
pc
- PageContext of the actuell Requestvalue
- resets the value of the variablePageException
public void set(double value) throws PageException
PageException
public Object setEL(PageContext pc, Object value)
public Object touch(PageContext pc) throws PageException
Reference
touch
in interface Reference
PageException
public Object touchEL(PageContext pc)
Reference
public Object remove(PageContext pc) throws PageException
Reference
remove
in interface Reference
PageException
public Object removeEL(PageContext pc)
Reference
public Collection getCollection()
public String getKeyAsString()
getKeyAsString
in interface Reference
public Collection.Key getKey()
Copyright © 2015 Lucee