| Package | Description |
|---|---|
| ch.awae.utils.logic |
The
Logic system provides an intuitive
extension to the BooleanSupplier that supports
boolean operators for more expressive solutions. |
| Modifier and Type | Field and Description |
|---|---|
static Logic |
Logic.FALSE
a logic instance that always evaluates to
false |
static Logic |
Logic.TRUE
a logic instance that always evaluates to
true |
| Modifier and Type | Method and Description |
|---|---|
Logic |
LogicGroup.all()
Creates a Logic instance over the group, defined by
all(Logic...). |
static Logic |
Logic.all(Logic... logics)
Creates a logic instance that evaluates to
true iff all base
instance evaluate to true. |
default Logic |
Logic.and(Logic other)
Combines this logic instance with another one in an
AND
operation. |
static Logic |
Logic.and(Logic logic0,
Logic... logics)
Creates a
Logic instance that combines all given logic instances
with an AND operation. |
Logic |
LogicGroup.any()
Creates a Logic instance over the group, defined by
any(Logic...). |
static Logic |
Logic.any(Logic... logics)
Creates a logic instance that evaluates to
true if any base
instance evaluates to true. |
Logic |
LogicGroup.count(int target)
Creates a Logic instance over the group, defined by
count(int, Logic...). |
static Logic |
Logic.count(int target,
Logic... logics)
Creates a logic instance that counts how many base instances evaluate to
true. |
default Logic |
Logic.edge()
Creates an edge-triggering
Logic instance. |
static Logic |
Logic.edge(Logic logic)
Creates an edge triggered logic instance.
|
static Logic |
Logic.from(java.util.function.BooleanSupplier f)
Creates a new
Logic instance from a BooleanSupplier |
Logic |
LogicGroup.none()
Creates a Logic instance over the group, defined by
none(Logic...). |
static Logic |
Logic.none(Logic... logics)
Creates a logic instance that evaluates to
true iff all base
instances evaluate to false. |
default Logic |
Logic.not()
Returns an instance with inverted logic.
|
static Logic |
Logic.not(Logic logic)
Creates a logic instance with inverted logic.
|
default Logic |
Logic.or(Logic other)
Combines this logic instance with another one in an
OR operation. |
static Logic |
Logic.or(Logic logic0,
Logic... logics)
Creates a
Logic instance that combines all given logic instances
with an OR operation. |
Logic |
LogicCluster.pattern(int code)
provides a
Logic instance testing for a specific evaluation
pattern. |
Logic |
LogicGroup.strict(LogicGroup domain)
Strict group evaluation on a restricted domain.
|
Logic[] |
LogicGroup.toArray()
Provides an array containing all group members
|
| Modifier and Type | Method and Description |
|---|---|
static Logic |
Logic.all(Logic... logics)
Creates a logic instance that evaluates to
true iff all base
instance evaluate to true. |
default Logic |
Logic.and(Logic other)
Combines this logic instance with another one in an
AND
operation. |
static Logic |
Logic.and(Logic logic0,
Logic... logics)
Creates a
Logic instance that combines all given logic instances
with an AND operation. |
static Logic |
Logic.and(Logic logic0,
Logic... logics)
Creates a
Logic instance that combines all given logic instances
with an AND operation. |
static Logic |
Logic.any(Logic... logics)
Creates a logic instance that evaluates to
true if any base
instance evaluates to true. |
static LogicCluster |
Logic.cluster(Logic... elements)
prepares a function evaluating all given elements and returns a summary
representing all states as a number.
|
static Logic |
Logic.count(int target,
Logic... logics)
Creates a logic instance that counts how many base instances evaluate to
true. |
static Logic |
Logic.edge(Logic logic)
Creates an edge triggered logic instance.
|
static Logic |
Logic.none(Logic... logics)
Creates a logic instance that evaluates to
true iff all base
instances evaluate to false. |
static Logic |
Logic.not(Logic logic)
Creates a logic instance with inverted logic.
|
default Logic |
Logic.or(Logic other)
Combines this logic instance with another one in an
OR operation. |
static Logic |
Logic.or(Logic logic0,
Logic... logics)
Creates a
Logic instance that combines all given logic instances
with an OR operation. |
static Logic |
Logic.or(Logic logic0,
Logic... logics)
Creates a
Logic instance that combines all given logic instances
with an OR operation. |
| Constructor and Description |
|---|
LogicCluster(Logic... elements)
Creates a new cluster instance from a list of
Logic elements. |
LogicGroup(Logic[] members)
Creates a new Logic group
|
Copyright © 2018. All Rights Reserved.