CharacterDiscriminator

A CharacterDiscriminator discriminates Characters. With Java's auto-boxing feature, it doesn't matter whether Character objects or char values are present; this Discriminator will discriminate them. It discriminates its input by discriminating directly on the byte values.

Example

Given the input...

  • {'j', 'A', 'g', 'g', ' ', 'v', 'a', 'l', 'u', 'e'}

... a CharacterDiscriminator returns the following equivalence classes:

  • {'j'}
  • {'A'}
  • {' '}
  • {'v'}
  • {'a'}
  • {'l'}
  • {'u'}
  • {'e'}
  • {'g', 'g'}