org.openmdx.compatibility.base.collection
Class Lists

java.lang.Object
  extended by org.openmdx.compatibility.base.collection.Lists

Deprecated.

public class Lists
extends Object

List utility classes

Author:
H. Burger

Field Summary
static String[] NO_STRING_VALUES
          Deprecated. The method String values returns an empty list if source is null.
 
Constructor Summary
Lists()
          Deprecated.  
 
Method Summary
static List fromArray(Object source)
          Deprecated. Returns a fixed-size list backed by the specified array.
static String[] stringValues(boolean[] source)
          Deprecated. Applys the String.valueOf() method to each of the array members.
static String[] stringValues(byte[] source)
          Deprecated. Applys the String.valueOf() method to each of the array members.
static String[] stringValues(Collection source)
          Deprecated. Applyies String.valueOf() to each of the collection's members.
static String[] stringValues(double[] source)
          Deprecated. Applys the String.valueOf() method to each of the array members.
static String[] stringValues(float[] source)
          Deprecated. Applys the String.valueOf() method to each of the array members.
static String[] stringValues(int[] source)
          Deprecated. Applys the String.valueOf() method to each of the array members.
static String[] stringValues(long[] source)
          Deprecated. Applys the String.valueOf() method to each of the array members.
static String[] stringValues(Object source)
          Deprecated. Applys the String.valueOf() method to each of the array or collections members.
static String[] stringValues(Object[] source)
          Deprecated. Applys the String.valueOf() method to each of the array members.
static String[] stringValues(short[] source)
          Deprecated. Applys the String.valueOf() method to each of the array members.
static byte[][] toBinaryArray(List source)
          Deprecated. Store a list's values in an array of byte arrays.
static boolean[] toBooleanArray(List source)
          Deprecated. Store a list's values in a boolean array.
static Number[] toNumberArray(List source)
          Deprecated. Store a list's values in a Number array.
static String[] toStringArray(List source)
          Deprecated. Store a list's values in a String array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_STRING_VALUES

public static String[] NO_STRING_VALUES
Deprecated. 
The method String values returns an empty list if source is null.

Constructor Detail

Lists

public Lists()
Deprecated. 
Method Detail

toStringArray

public static String[] toStringArray(List source)
Deprecated. 
Store a list's values in a String array.

Returns:
a String array with the list's values
Throws:
ClassCastException - If any of the values is not an instance of String

toNumberArray

public static Number[] toNumberArray(List source)
Deprecated. 
Store a list's values in a Number array.

Returns:
a Number array with the list's values
Throws:
ClassCastException - If any of the values is not an instance of Number

toBinaryArray

public static byte[][] toBinaryArray(List source)
Deprecated. 
Store a list's values in an array of byte arrays.

Returns:
an array of byte arrays with the list's values
Throws:
ClassCastException - If any of the values is not an instance of byte[]

toBooleanArray

public static boolean[] toBooleanArray(List source)
Deprecated. 
Store a list's values in a boolean array.

Returns:
a boolean array with the list's values
Throws:
NullPointerException - if any of the values is null
ClassCastException - if any of the values is not an instance of Boolean

stringValues

public static String[] stringValues(byte[] source)
Deprecated. 
Applys the String.valueOf() method to each of the array members.

Returns:
an array with the string representation of the source's values

stringValues

public static String[] stringValues(short[] source)
Deprecated. 
Applys the String.valueOf() method to each of the array members.

Returns:
an array with the string representation of the source's values

stringValues

public static String[] stringValues(int[] source)
Deprecated. 
Applys the String.valueOf() method to each of the array members.

Returns:
an array with the string representation of the source's values

stringValues

public static String[] stringValues(long[] source)
Deprecated. 
Applys the String.valueOf() method to each of the array members.

Returns:
an array with the string representation of the source's values

stringValues

public static String[] stringValues(float[] source)
Deprecated. 
Applys the String.valueOf() method to each of the array members.

Returns:
an array with the string representation of the source's values

stringValues

public static String[] stringValues(double[] source)
Deprecated. 
Applys the String.valueOf() method to each of the array members.

Returns:
an array with the string representation of the source's values

stringValues

public static String[] stringValues(boolean[] source)
Deprecated. 
Applys the String.valueOf() method to each of the array members.

Returns:
an array with the string representation of the source's values

stringValues

public static String[] stringValues(Collection source)
Deprecated. 
Applyies String.valueOf() to each of the collection's members.

Returns:
a an array with the string representation of the collection's values

stringValues

public static String[] stringValues(Object[] source)
Deprecated. 
Applys the String.valueOf() method to each of the array members.

Returns:
an array with the string representation of the source's values

stringValues

public static String[] stringValues(Object source)
Deprecated. 
Applys the String.valueOf() method to each of the array or collections members.

Returns:
an array with the string representation of the source's values

fromArray

public static List fromArray(Object source)
Deprecated. 
Returns a fixed-size list backed by the specified array. (Changes to the returned list "write through" to the array.) This method acts as bridge between array-based and collection-based APIs. The returned list is serializable.

Parameters:
source - the array by which the list will be backed.
Returns:
a list view of the specified array.
Throws:
ClassCastException - if array is not an instance of an array


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.