Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

ch.unibe.iam.scg.archie.utils
Class ArrayUtils

java.lang.Object
  extended by ch.unibe.iam.scg.archie.utils.ArrayUtils

public class ArrayUtils
extends java.lang.Object

Array utility class providing convenience methods for arrays.

$Id$


Constructor Summary
ArrayUtils()
           
 
Method Summary
static boolean hasInterface(java.lang.Class<?>[] interfaces, java.lang.Class<?> needle)
           
static boolean hasMethod(java.lang.reflect.Method[] methods, java.lang.String needle)
          Checks for a given method name in the array of methods.
static boolean inArray(int[] array, int needle)
           
static void print(int[] array)
          Prints out an int array in human readable form.
static java.lang.String toString(int[] array)
          Generates a string representation of an int 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

print

public static final void print(int[] array)
Prints out an int array in human readable form.

Parameters:
array - An int array.

toString

public static final java.lang.String toString(int[] array)
Generates a string representation of an int array. An example string representation could look like [3,2,7].

Parameters:
array - Array of ints.
Returns:
String representation of an array.

inArray

public static final boolean inArray(int[] array,
                                    int needle)
Parameters:
array -
needle -
Returns:
True if the given needle is in the array.

hasInterface

public static final boolean hasInterface(java.lang.Class<?>[] interfaces,
                                         java.lang.Class<?> needle)
Parameters:
interfaces -
needle -
Returns:
True if the given class is in the interfaces array.

hasMethod

public static boolean hasMethod(java.lang.reflect.Method[] methods,
                                java.lang.String needle)
Checks for a given method name in the array of methods.

Parameters:
methods - Array of Method objects.
string - Needle, the method name to search for.
Returns:
True if a method with the given name exists in the array, false else.

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013