org.mtzky.reflect
クラス IterableUtils

java.lang.Object
  上位を拡張 org.mtzky.reflect.IterableUtils

public class IterableUtils
extends Object

Iterable and array utilities. It is useful to loop in the one-liner statement.

導入されたバージョン:
0.1.4
作成者:
mtzky

入れ子のクラスの概要
static interface IterableUtils.Contain<E>
           
static interface IterableUtils.Each<E>
           
static interface IterableUtils.EachWithIndex<E>
           
static interface IterableUtils.Find<E>
           
static interface IterableUtils.Wrap<FROM,TO>
           
 
メソッドの概要
static
<E> boolean
each(E[] a, IterableUtils.Contain<E> cb)
           
static
<E> E[]
each(E[] a, IterableUtils.Each<E> cb)
           
static
<E> E[]
each(E[] a, IterableUtils.EachWithIndex<E> cb)
           
static
<E> E
each(E[] a, IterableUtils.Find<E> cb)
           
static
<FROM,TO> TO[]
each(FROM[] a, IterableUtils.Wrap<FROM,TO> cb, TO... type)
           
static
<E> boolean
each(Iterable<E> it, IterableUtils.Contain<E> cb)
           
static
<E> E
each(Iterable<E> it, IterableUtils.Find<E> cb)
           
static
<FROM,TO> TO[]
each(Iterable<FROM> it, IterableUtils.Wrap<FROM,TO> cb, TO... type)
           
static
<E,IT extends Iterable<E>>
IT
each(IT it, IterableUtils.Each<E> cb)
           
static
<E,IT extends 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 array
cb - IterableUtils.Each.call(Object)
戻り値:
The passed array a itself

each

public static <E,IT extends Iterable<E>> IT each(IT it,
                                                 IterableUtils.Each<E> cb)
型パラメータ:
E - A Iterable element type
IT - A Iterable object type
パラメータ:
it - A Iterable object
cb - 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 array
cb - IterableUtils.EachWithIndex.call(Object, int)
戻り値:
The passed array a itself

each

public static <E,IT extends Iterable<E>> IT each(IT it,
                                                 IterableUtils.EachWithIndex<E> cb)
型パラメータ:
E - A Iterable element type
IT - A Iterable object type
パラメータ:
it - A Iterable object
cb - 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 array
cb - IterableUtils.Find.call(Object)
戻り値:
found element, or null if not found

each

public static <E> E each(Iterable<E> it,
                         IterableUtils.Find<E> cb)
型パラメータ:
E - A Iterable element type
パラメータ:
it - A Iterable object
cb - 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 array
cb - IterableUtils.Find.call(Object)
戻り値:
true if found

each

public static <E> boolean each(Iterable<E> it,
                               IterableUtils.Contain<E> cb)
型パラメータ:
E - A Iterable element type
パラメータ:
it - A Iterable object
cb - 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 passed
TO - The array type returned
パラメータ:
a - An array
cb - IterableUtils.Wrap.call(Object)
type - to get a returned type; Don't pass null.
戻り値:
A wrapping array

each

public static <FROM,TO> TO[] each(Iterable<FROM> it,
                                  IterableUtils.Wrap<FROM,TO> cb,
                                  TO... type)
                 throws InstantiationException,
                        IllegalAccessException
型パラメータ:
FROM - The Iterable element type passed
TO - The Iterable element type returned
パラメータ:
it - A Iterable object
cb - IterableUtils.Wrap.call(Object)
例外:
IllegalAccessException
InstantiationException


Copyright (C) 2010-2011 Mtzky. AllRights Reserved.