|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.rep.values.Variable
edu.washington.cs.supple.rep.values.AsBooleanValue
AsBooleanValue converts a non-boolean value into a boolean according to a specified condition.
| Field Summary | |
ValueBinding |
a
|
int |
condition
|
static int |
TRUE_BY_DEFAULT
True if the value is true, not null, or not empty. |
static int |
TRUE_IF_EXACTLY_ONE_VALUE
True if the value is a collection with only one element. |
static int |
TRUE_IF_FALSE
True if the value is a boolean and false. |
static int |
TRUE_IF_MORE_THAN_ONE_VALUE
True if the value is a collection with multiple elements. |
static int |
TRUE_IF_NOT_EMPTY
True if the value is an empty collection. |
static int |
TRUE_IF_NULL
True only if the value is null. |
java.lang.Boolean |
value
|
| Constructor Summary | |
AsBooleanValue(ValueBinding a)
|
|
AsBooleanValue(ValueBinding a,
int condition)
|
|
| Method Summary | |
protected boolean |
computeValue(java.lang.Object o)
Determine if value of o is true according to the desired condition. |
java.lang.Object |
getValue()
Get the bound value. |
java.lang.Class |
getValueClass()
Get the class of this variable |
protected void |
postLastListener()
Subclasses can use this to implement post-last-listener cleanup. |
protected void |
preFirstListener()
Subclasses can use this to implement pre-first-listener setup. |
void |
setValue(java.lang.Object value)
Set the value of this variable. |
void |
valueChanged(ValueBinding binding,
java.lang.Object newValue)
Signals variable change. |
| Methods inherited from class edu.washington.cs.supple.rep.values.Variable |
addListener, processUpdate, removeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.washington.cs.supple.rep.values.ValueBinding |
addListener, removeListener |
| Field Detail |
public static final int TRUE_BY_DEFAULT
public static final int TRUE_IF_NULL
public static final int TRUE_IF_EXACTLY_ONE_VALUE
public static final int TRUE_IF_MORE_THAN_ONE_VALUE
public static final int TRUE_IF_NOT_EMPTY
public static final int TRUE_IF_FALSE
public final int condition
public final ValueBinding a
public java.lang.Boolean value
| Constructor Detail |
public AsBooleanValue(ValueBinding a)
public AsBooleanValue(ValueBinding a,
int condition)
| Method Detail |
protected boolean computeValue(java.lang.Object o)
public final java.lang.Class getValueClass()
ValueBinding
getValueClass in interface ValueBindingpublic final java.lang.Object getValue()
ValueBinding
getValue in interface ValueBindingpublic final void setValue(java.lang.Object value)
ValueBinding
setValue in interface ValueBindingvalue - protected void preFirstListener()
Variable
preFirstListener in class Variableprotected void postLastListener()
Variable
postLastListener in class Variable
public final void valueChanged(ValueBinding binding,
java.lang.Object newValue)
ValueListener
valueChanged in interface ValueListenerbinding - newValue -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||