Class SuperclassIterable<T>
java.lang.Object
nl.jqno.equalsverifier.internal.reflection.SuperclassIterable<T>
Iterable to iterate over all superclasses of a class.
-
Method Summary
Modifier and TypeMethodDescriptioniterator()
Returns an iterator over all superclasses of the class.static <T> SuperclassIterable<T>
Factory method for a SuperlcassIterator that iterates over type's superclasses, excluding itself and excluding Object.static <T> SuperclassIterable<T>
ofIncludeSelf
(Class<T> type) Factory method for a SuperlcassIterator that iterates over type's superclasses, including itself but excluding Object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
of
Factory method for a SuperlcassIterator that iterates over type's superclasses, excluding itself and excluding Object.- Type Parameters:
T
- Type parameter for type.- Parameters:
type
- The class over whose superclasses to iterate.- Returns:
- A SuperclassIterator.
-
ofIncludeSelf
Factory method for a SuperlcassIterator that iterates over type's superclasses, including itself but excluding Object.- Type Parameters:
T
- Type parameter for type.- Parameters:
type
- The class over whose superclasses to iterate.- Returns:
- A SuperclassIterator.
-
iterator
Returns an iterator over all superclasses of the class. Is empty if type has no superclasses and SuperclassIterable does not include self.
-