DoubleDiscriminator

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

Example

Given the input...

  • {0.0, -12.8, 12.7, 0.56, -1.0, 67.67, 56.0, -12.8, 56.0, -0.56}

... a DoubleDiscriminator returns the following equivalence classes:

  • {0.0}
  • {12.7}
  • {0.56}
  • {-1.0}
  • {67.67}
  • {-0.56}
  • {-12.8, -12.8}
  • {56.0, 56.0}