public enum BooleanResultFunction extends Enum<BooleanResultFunction>
BooleanResultFunction
s are used by instances ofBooleanEntry
during the negotiation of boolean
parameters.
They determine a negotiation outcome based on a logical AND
or OR
operation.
Enum Constant and Description |
---|
AND
The negotiation result will be
true only if both initiator and target support that value. |
OR
The negotiation result will be
true only if either the initiator or the target support that value. |
Modifier and Type | Method and Description |
---|---|
boolean |
getResult(boolean a,
boolean b)
Performs a logical
AND or OR operation on the two parameters and returns the result. |
static BooleanResultFunction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BooleanResultFunction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BooleanResultFunction AND
true
only if both initiator and target support that value.public static final BooleanResultFunction OR
true
only if either the initiator or the target support that value.public static BooleanResultFunction[] values()
for (BooleanResultFunction c : BooleanResultFunction.values()) System.out.println(c);
public static BooleanResultFunction valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic final boolean getResult(boolean a, boolean b)
AND
or OR
operation on the two parameters and returns the result.
The type of the operation depends on the value of this BooleanResultFunction
.a
- the first boolean valueb
- the second boolean valueAND
or OR
operation.Copyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.