at.molindo.utils.collections
Class ArrayUtils

java.lang.Object
  extended by at.molindo.utils.collections.ArrayUtils

public class ArrayUtils
extends Object


Constructor Summary
ArrayUtils()
           
 
Method Summary
static
<T> T[]
append(T[] a, T o)
          appends an object to an array
static boolean empty(byte[] a)
           
static boolean empty(char[] a)
           
static boolean empty(double[] a)
           
static boolean empty(float[] a)
           
static boolean empty(int[] a)
           
static boolean empty(long[] a)
           
static boolean empty(short[] a)
           
static
<T> boolean
empty(T[] a)
           
static boolean equals(byte[] a, byte[] a2, int off, int len)
           
static byte first(byte[] a)
           
static char first(char[] a)
           
static double first(double[] a)
           
static float first(float[] a)
           
static int first(int[] a)
           
static long first(long[] a)
           
static short first(short[] a)
           
static
<T> T
first(T[] a)
           
static
<T> Iterable<T>
iterable(T... a)
           
static
<T> Iterator<T>
iterator(T... a)
           
static byte last(byte[] a)
           
static char last(char[] a)
           
static double last(double[] a)
           
static float last(float[] a)
           
static int last(int[] a)
           
static long last(long[] a)
           
static short last(short[] a)
           
static
<T> T
last(T[] a)
           
static int length(byte[] a)
           
static int length(char[] a)
           
static int length(double[] a)
           
static int length(float[] a)
           
static int length(int[] a)
           
static int length(long[] a)
           
static int length(short[] a)
           
static
<T> int
length(T[] a)
           
static Iterable<Object> toIterable(Object array)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayUtils

public ArrayUtils()
Method Detail

equals

public static boolean equals(byte[] a,
                             byte[] a2,
                             int off,
                             int len)

empty

public static <T> boolean empty(T[] a)
Returns:
true if a is not null and a.length > 0

empty

public static boolean empty(byte[] a)
Returns:
true if a is not null and a.length > 0

empty

public static boolean empty(int[] a)
Returns:
true if a is not null and a.length > 0

empty

public static boolean empty(short[] a)
Returns:
true if a is not null and a.length > 0

empty

public static boolean empty(long[] a)
Returns:
true if a is not null and a.length > 0

empty

public static boolean empty(float[] a)
Returns:
true if a is not null and a.length > 0

empty

public static boolean empty(double[] a)
Returns:
true if a is not null and a.length > 0

empty

public static boolean empty(char[] a)
Returns:
true if a is not null and a.length > 0

first

public static <T> T first(T[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

first

public static byte first(byte[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

first

public static int first(int[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

first

public static short first(short[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

first

public static long first(long[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

first

public static float first(float[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

first

public static double first(double[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

first

public static char first(char[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

last

public static <T> T last(T[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

last

public static byte last(byte[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

last

public static int last(int[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

last

public static short last(short[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

last

public static long last(long[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

last

public static float last(float[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

last

public static double last(double[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

last

public static char last(char[] a)
Returns:
a[0] if array isn't empty
See Also:
empty(Object[])

length

public static <T> int length(T[] a)
Returns:
null-safe length of array

length

public static int length(byte[] a)
Returns:
null-safe length of array

length

public static int length(int[] a)
Returns:
null-safe length of array

length

public static int length(short[] a)
Returns:
null-safe length of array

length

public static int length(long[] a)
Returns:
null-safe length of array

length

public static int length(float[] a)
Returns:
null-safe length of array

length

public static int length(double[] a)
Returns:
null-safe length of array

length

public static int length(char[] a)
Returns:
null-safe length of array

iterable

public static <T> Iterable<T> iterable(T... a)

iterator

public static <T> Iterator<T> iterator(T... a)

toIterable

public static Iterable<Object> toIterable(Object array)

append

public static <T> T[] append(T[] a,
                             T o)
appends an object to an array

Type Parameters:
T -
Parameters:
a -
o -
Returns:


Copyright © 2013 Molindo GmbH. All Rights Reserved.