org.mtzky.reflect
クラス IterableUtils
java.lang.Object
org.mtzky.reflect.IterableUtils
public class IterableUtils
- extends java.lang.Object
Iterable and array utilities. It is useful to loop in the one-liner
statement.
- 導入されたバージョン:
- 0.1.4
- 作成者:
- mtzky
|
メソッドの概要 |
static
|
each(E[] a,
IterableUtils.Contain<E> cb)
|
static
|
each(E[] a,
IterableUtils.Each<E> cb)
|
static
|
each(E[] a,
IterableUtils.EachWithIndex<E> cb)
|
static
|
each(E[] a,
IterableUtils.Find<E> cb)
|
static
|
each(FROM[] a,
IterableUtils.Wrap<FROM,TO> cb,
TO... type)
|
static
|
each(java.lang.Iterable<E> it,
IterableUtils.Contain<E> cb)
|
static
|
each(java.lang.Iterable<E> it,
IterableUtils.Find<E> cb)
|
static
|
each(java.lang.Iterable<FROM> it,
IterableUtils.Wrap<FROM,TO> cb,
TO... type)
|
static
<E,IT extends java.lang.Iterable<E>>
IT |
|
each(IT it,
IterableUtils.Each<E> cb)
|
static
<E,IT extends java.lang.Iterable<E>>
IT |
|
each(IT it,
IterableUtils.EachWithIndex<E> cb)
|
| クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
each
public static <E> E[] each(E[] a,
IterableUtils.Each<E> cb)
- 型パラメータ:
E - An array type- パラメータ:
a - An arraycb - IterableUtils.Each.call(Object)
- 戻り値:
- The passed array
a itself
each
public static <E,IT extends java.lang.Iterable<E>> IT each(IT it,
IterableUtils.Each<E> cb)
- 型パラメータ:
E - A Iterable element typeIT - A Iterable object type- パラメータ:
it - A Iterable objectcb - IterableUtils.Each.call(Object)
- 戻り値:
- The passed
Iterable object a itself
each
public static <E> E[] each(E[] a,
IterableUtils.EachWithIndex<E> cb)
- 型パラメータ:
E - An array type- パラメータ:
a - An arraycb - IterableUtils.EachWithIndex.call(Object, int)
- 戻り値:
- The passed array
a itself
each
public static <E,IT extends java.lang.Iterable<E>> IT each(IT it,
IterableUtils.EachWithIndex<E> cb)
- 型パラメータ:
E - A Iterable element typeIT - A Iterable object type- パラメータ:
it - A Iterable objectcb - IterableUtils.EachWithIndex.call(Object, int)
- 戻り値:
- The passed
Iterable object a itself
each
public static <E> E each(E[] a,
IterableUtils.Find<E> cb)
- 型パラメータ:
E - An array type- パラメータ:
a - An arraycb - IterableUtils.Find.call(Object)
- 戻り値:
- found element, or null if not found
each
public static <E> E each(java.lang.Iterable<E> it,
IterableUtils.Find<E> cb)
- 型パラメータ:
E - A Iterable element type- パラメータ:
it - A Iterable objectcb - IterableUtils.Find.call(Object)
- 戻り値:
- found element, or null if not found
each
public static <E> boolean each(E[] a,
IterableUtils.Contain<E> cb)
- 型パラメータ:
E - An array type- パラメータ:
a - An arraycb - IterableUtils.Find.call(Object)
- 戻り値:
true if found
each
public static <E> boolean each(java.lang.Iterable<E> it,
IterableUtils.Contain<E> cb)
- 型パラメータ:
E - A Iterable element type- パラメータ:
it - A Iterable objectcb - IterableUtils.Find.call(Object)
- 戻り値:
true if found
each
public static <FROM,TO> TO[] each(FROM[] a,
IterableUtils.Wrap<FROM,TO> cb,
TO... type)
- 型パラメータ:
FROM - The array type passedTO - The array type returned- パラメータ:
a - An arraycb - IterableUtils.Wrap.call(Object)type - to get a returned type; Don't pass null.
- 戻り値:
- A wrapping array
each
public static <FROM,TO> TO[] each(java.lang.Iterable<FROM> it,
IterableUtils.Wrap<FROM,TO> cb,
TO... type)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException
- 型パラメータ:
FROM - The Iterable element type passedTO - The Iterable element type returned- パラメータ:
it - A Iterable objectcb - IterableUtils.Wrap.call(Object)
- 例外:
java.lang.IllegalAccessException
java.lang.InstantiationException
Copyright (C) 2010-2011 Mtzky. AllRights Reserved.