public enum Conjunction extends Enum<Conjunction> implements EnumType<String>
Conjunction represents a function that maps a list of boolean arguments to one boolean result.| Enum Constant and Description |
|---|
AND
This conjunction is
true if and only if all arguments are true. |
NAND
This is the negation of
AND. |
NOR
This is the negation of
OR. |
OR
This conjunction is
true if and only if at least one argument is true. |
| Modifier and Type | Field and Description |
|---|---|
private String |
title |
private String |
value |
| Modifier and Type | Method and Description |
|---|---|
boolean |
eval(boolean... arguments)
This method evaluates this conjunction for the given boolean
arguments. |
abstract boolean |
evalEmpty() |
abstract Boolean |
evalSingle(boolean argument) |
static Conjunction |
fromValue(String value)
This method gets the
Conjunction with the given value. |
String |
getValue()
This method returns the raw value of this datatype.
|
boolean |
isNegation() |
abstract Conjunction |
negate() |
String |
toString()
|
static Conjunction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Conjunction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Conjunction AND
true if and only if all arguments are true.public static final Conjunction OR
true if and only if at least one argument is true.public static final Conjunction NAND
public static final Conjunction NOR
public static Conjunction[] values()
for (Conjunction c : Conjunction.values()) System.out.println(c);
public static Conjunction 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 eval(boolean... arguments)
arguments.arguments - are the boolean values to evaluate.arguments.public abstract Boolean evalSingle(boolean argument)
argument - is a literal boolean argument.Boolean.TRUE if eval(boolean...) will return true if any of the given arguments
has the value of the given argument, Boolean.FALSE if eval(boolean...) will return
false if any of the given arguments has the value of the given argument, null
otherwise.public abstract boolean evalEmpty()
eval(boolean...) for no argument (an empty argument array).public String getValue()
SimpleDatatypeString
, Character, Boolean, any type of Number, any type of java.time.LocalDate, etc.).getValue in interface AttributeReadValue<String>getValue in interface SimpleDatatype<String>public abstract Conjunction negate()
Conjunction that evaluates to the negated result.public String toString()
DatatypeString representation of this Datatype. While the general contract of
Object.toString() is very weak and mainly used for debugging, the contract here is very strong. The
returned String has to be suitable for end-users and official output to any kind of sink. NlsMessage for
this purpose and implement NlsObject if you want to support I18N/L10N.public static Conjunction fromValue(String value)
Conjunction with the given value.value - is the value of the requested Conjunction.Conjunction.Copyright © 2001–2016 mmm-Team. All rights reserved.