|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.util.Narrow
public class Narrow
Utility for narrowing object instances to Class
types
See to(Object, Class)
Method Summary | ||
---|---|---|
static
|
iterableTo(java.lang.Iterable<?> iterable,
java.lang.Class<T> aClass)
Filters given Iterable returning only these objects which could be narrowed to given type |
|
static
|
to(java.lang.Object o,
java.lang.Class<T> aClass)
Narrows the given Object to the type of the Class
If object cannot be narrowed to the given type this method returns null |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
@Nullable public static <T> T to(@NotNull java.lang.Object o, @NotNull java.lang.Class<T> aClass)
Object
to the type of the Class
If object cannot be narrowed to the given type this method returns null
T
- o
- aClass
-
public static <T> java.lang.Iterable<T> iterableTo(@NotNull java.lang.Iterable<?> iterable, @NotNull java.lang.Class<T> aClass)
T
- iterable
- input iterable containing elements to filteraClass
- class used to narrow elements of iterable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |