Built-In Discriminators

The "msd" package contains the “Discriminator” interface plus many built-in Discriminators. The developer will usually not need to reference Discriminators directly.

Here is a list of the 21 built-in Discriminators:


When multiset discrimination is used, jAgg uses a PropertiesDiscriminator to "line up" all of the original list of values for the purposes of aggregate calculation. However, each property will in turn need to be discriminated. There is a Discriminator for all of the built-in types that are most likely to need discrimination. However, custom object types would need to be discriminated also. To be discriminated, a custom object type needs to implement the Discriminable interface. Then, a DiscriminableDiscriminator gets the properties to discriminate, and defers to a PropertiesDiscriminator. Note that this is not necessary for the type of objects being passed to the groupBy method; this is necessary for object types that represent the property types of the objects being passed to the groupBy method.

All built-in Discriminators subclass the abstract class AbstractDiscriminator. Some built-in Discriminators subclass ChainedDiscriminator, which extends AbstractDiscriminator, some built-in Discriminators subclass PortionDiscriminator, which extends AbstractDiscriminator, and other built-in Discriminators subclass AbstractDiscriminator directly.