'Selecting a subset of extensions of a Class in Java

Let's say we have an abstract class AbstractSensor and a variety of classes that implement that abstract class, such as Velocity, Touch, Area, etc.

What is the best way to check if an AbstractSensor object belongs to a subset of these implementations (let's say, belongs to {Touch, Area})? What's the best way to define the subset?

Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source