Class IterableType<T>
java.lang.Object
com.saicone.rtag.util.IterableType<T>
- Type Parameters:
T- the iterable object type.
- All Implemented Interfaces:
Iterable<T>
- Direct Known Subclasses:
OptionalType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TGet the object that can be iterated.booleanCheck if the current object can be iterated using for statement.
This condition can be applied to anyIterabletype or array.booleanSame hasisIterable()but with inverted result.iterator()protected abstract voidsetIterable(T object) Set the object that can be iterated.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
IterableType
public IterableType()
-
-
Method Details
-
getIterable
Get the object that can be iterated.- Returns:
- an iterable object.
-
setIterable
Set the object that can be iterated.- Parameters:
object- an iterable object.
-
isIterable
public boolean isIterable()Check if the current object can be iterated using for statement.
This condition can be applied to anyIterabletype or array.- Returns:
- true if the object can be iterated.
-
isNotIterable
public boolean isNotIterable()Same hasisIterable()but with inverted result.- Returns:
- true if the object can't be iterated.
-
iterator
-