Or

See javadoc - uk.gov.gchq.koryphe.impl.binaryoperator.Or

Available since Koryphe version 1.0.0

Applies the logical OR operation to 2 booleans

Examples

Or with booleans

Java
JSON
Full JSON
final Or or = new Or();
{
  "class" : "uk.gov.gchq.koryphe.impl.binaryoperator.Or"
}
{
  "class" : "uk.gov.gchq.koryphe.impl.binaryoperator.Or"
}

Input type:

java.lang.Boolean

Example inputs:

Input TypeInputsResult TypeResult
java.lang.Booleantrue and truejava.lang.Booleantrue
java.lang.Booleantrue and falsejava.lang.Booleantrue
java.lang.Booleanfalse and falsejava.lang.Booleanfalse

Or with nulls

Java
JSON
Full JSON
final Or or = new Or();
{
  "class" : "uk.gov.gchq.koryphe.impl.binaryoperator.Or"
}
{
  "class" : "uk.gov.gchq.koryphe.impl.binaryoperator.Or"
}

Input type:

java.lang.Boolean

Example inputs:

Input TypeInputsResult TypeResult
java.lang.Booleanfalse and nulljava.lang.Booleanfalse
java.lang.Booleantrue and nulljava.lang.Booleantrue
null and nullnull

Or with non boolean values

Java
JSON
Full JSON
final Or or = new Or();
{
  "class" : "uk.gov.gchq.koryphe.impl.binaryoperator.Or"
}
{
  "class" : "uk.gov.gchq.koryphe.impl.binaryoperator.Or"
}

Input type:

java.lang.Boolean

Example inputs:

Input TypeInputsResult TypeResult
java.lang.Stringtest and 3ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
java.lang.Integer0 and 0ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean
java.lang.Integer1 and 0ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean

results matching ""

    No results matching ""