|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.ponder2.objects.P2Object
net.ponder2.objects.P2Boolean
public class P2Boolean
A boolean object.
| Field Summary | |
|---|---|
static P2Boolean |
False
|
static P2Boolean |
True
|
| Constructor Summary | |
|---|---|
protected |
P2Boolean()
constructor for Ponder2 serialisation |
| Method Summary | |
|---|---|
protected boolean |
and(boolean aBoolean)
Answers a boolean being the receiver AND aBoolean |
protected boolean |
and(P2Object source,
P2Block aBlock)
Answers a boolean being the receiver AND the value of aBlock if the receiver is true. |
boolean |
asBoolean()
Returns itself as a boolean |
static P2Boolean |
from(java.lang.String string)
|
protected P2Object |
ifFalse(P2Object source,
P2Block aBlock)
Executes aBlock if the receiver is false. |
protected P2Object |
ifFalseifTrue(P2Object source,
P2Block aBlockFalse,
P2Block aBlockTrue)
Executes aBlockFalse if the receiver is false otherwise aBlockTrue is executed. |
protected P2Object |
ifTrue(P2Object source,
P2Block aBlock)
Executes aBlock if the receiver is true. |
protected P2Object |
ifTrueifFalse(P2Object source,
P2Block aBlockTrue,
P2Block aBlockFalse)
Executes aBlockTrue if the receiver is true otherwise aBlockFalse is executed. |
protected boolean |
not()
Answers a boolean being the logical NOT operator applied to the receiver |
protected boolean |
or(boolean aBoolean)
Answers a boolean being the receiver OR aBoolean |
protected boolean |
or(P2Object source,
P2Block aBlock)
Answers a boolean being the receiver OR the value of aBlock if the receiver is false. |
protected boolean |
random()
Answers with a random boolean value |
P2Object |
readXml(com.twicom.qdparser.TaggedElement xml,
java.util.Map<java.lang.Integer,P2Serializable> read)
|
java.lang.String |
toString()
|
com.twicom.qdparser.TaggedElement |
writeXml(java.util.Set<P2Object> written)
|
| Methods inherited from class net.ponder2.objects.P2Object |
|---|
asArray, asBlock, asClass, asDouble, asFloat, asHash, asInteger, asLong, asNumber, asP2Array, asString, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, fromXml, getManagedObject, getOID, getSMC, operation, operation, setSMC |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final P2Boolean True
public static final P2Boolean False
| Constructor Detail |
|---|
protected P2Boolean()
| Method Detail |
|---|
public static P2Boolean from(java.lang.String string)
throws Ponder2ArgumentException
Ponder2ArgumentException
public boolean asBoolean()
throws Ponder2ArgumentException
P2Object
asBoolean in class P2ObjectPonder2ArgumentExceptionprotected boolean not()
protected boolean and(boolean aBoolean)
aBoolean - the value for the AND operation
protected boolean or(boolean aBoolean)
aBoolean - the value for the OR operation
protected boolean random()
protected boolean and(P2Object source,
P2Block aBlock)
throws Ponder2Exception
aBlock - the block to be executed if this is true
Ponder2Exception
protected boolean or(P2Object source,
P2Block aBlock)
throws Ponder2Exception
aBlock - the block to be executed if this is false
Ponder2Exception
protected P2Object ifTrue(P2Object source,
P2Block aBlock)
throws Ponder2Exception
aBlock - the block to be executed if this is true
Ponder2Exception
protected P2Object ifFalse(P2Object source,
P2Block aBlock)
throws Ponder2Exception
aBlock - the block to be executed if this is false
Ponder2Exception
protected P2Object ifTrueifFalse(P2Object source,
P2Block aBlockTrue,
P2Block aBlockFalse)
throws Ponder2Exception
aBlockTrue - the block to be executed if this is trueaBlockFalse - the block to be executed if this is false
Ponder2Exception
protected P2Object ifFalseifTrue(P2Object source,
P2Block aBlockFalse,
P2Block aBlockTrue)
throws Ponder2Exception
aBlockFalse - the block to be executed if this is falseaBlockTrue - the block to be executed if this is true
Ponder2Exception
public com.twicom.qdparser.TaggedElement writeXml(java.util.Set<P2Object> written)
throws Ponder2OperationException
writeXml in interface P2SerializablewriteXml in class P2ObjectPonder2OperationException
public P2Object readXml(com.twicom.qdparser.TaggedElement xml,
java.util.Map<java.lang.Integer,P2Serializable> read)
throws Ponder2OperationException
readXml in interface P2SerializablereadXml in class P2ObjectPonder2OperationExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||