Package org.cactoos.scalar
Class InheritanceLevel
- java.lang.Object
-
- org.cactoos.scalar.InheritanceLevel
-
public final class InheritanceLevel extends Object implements Scalar<Integer>
The 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).
- Since:
- 0.30
-
-
Constructor Summary
Constructors Constructor Description InheritanceLevel(Class<?> cderived, Class<?> cbase)
Ctor.
-