public abstract class ARef extends AReference implements IRef
Modifier and Type | Field and Description |
---|---|
protected IFn |
validator |
private IPersistentMap |
watches |
Constructor and Description |
---|
ARef() |
ARef(IPersistentMap meta) |
Modifier and Type | Method and Description |
---|---|
IRef |
addWatch(java.lang.Object key,
IFn callback) |
IFn |
getValidator() |
IPersistentMap |
getWatches() |
void |
notifyWatches(java.lang.Object oldval,
java.lang.Object newval) |
IRef |
removeWatch(java.lang.Object key) |
void |
setValidator(IFn vf) |
(package private) void |
validate(IFn vf,
java.lang.Object val) |
(package private) void |
validate(java.lang.Object val) |
alterMeta, meta, resetMeta
protected volatile IFn validator
private volatile IPersistentMap watches
public ARef()
public ARef(IPersistentMap meta)
void validate(IFn vf, java.lang.Object val)
void validate(java.lang.Object val)
public void setValidator(IFn vf)
setValidator
in interface IRef
public IFn getValidator()
getValidator
in interface IRef
public IPersistentMap getWatches()
getWatches
in interface IRef
public IRef removeWatch(java.lang.Object key)
removeWatch
in interface IRef
public void notifyWatches(java.lang.Object oldval, java.lang.Object newval)