kactoos-jvm / nnl.rocks.kactoos.scalar / InheritanceLevel / <init>
<init>
InheritanceLevel(derived: Class<*>, base: Class<*>)
Calculates number of superclasses between base and derived class.
This class is thread safe.
Result interpretation:
- Integer.MIN_VALUE -> classes are not related. (ex. matching FileNotFoundException with RuntimeException);
- 0 -> classes are identical. (ex. matching IOException with IOException);
- 1 -> single level inheritance. (ex. matching FileNotFoundException with IOException);
- 2 -> two inheritance levels. (ex. matching FileNotFoundException with Exception).
Parameters
derived - Derived class
base - Base class
Since
0.4