ClassDiscriminator

A ClassDiscriminator discriminates objects based on their class names. It discriminates its input by calling getClass().getName() to extract the class names, then using a CharSequenceDiscriminator to discriminate on the class name strings.

Example

Given the input...

  • {"jAgg", new Integer(1), new Integer(2), "", new Widget("one"), new RuntimeException(), new ClassCastException(), new Widget("two"), new CountAggregator("*"), String.class}

... a ClassDiscriminator returns the following equivalence classes:

  • {RuntimeException()}
  • {ClassCastException()}
  • {CountAggregator("*")}
  • {String.class}
  • {"jAgg", ""}
  • {Integer(1), Integer(2)}
  • {Widget("one"), Widget("two")}