BooleanDiscriminator

A BooleanDiscriminator discriminates Booleans. With Java's auto-boxing feature, it doesn't matter whether Boolean objects or boolean values are present; this Discriminator will discriminate them. Because there are only two boolean values, the BooleanDiscriminator places each item in one of two buckets, for false and true.

Example

Given the input...

  • {true, false, true, true, true, false, false, true, false, false}

... a BooleanDiscriminator returns the following equivalence classes:

  • {true, true, true, true, true}
  • {false, false, false, false, false}