Rule Execution Server API

ilog.rules.bom.util
Class IlrCollections

java.lang.Object
  extended by ilog.rules.bom.util.IlrCollections

public final class IlrCollections
extends Object

This is a utility class which has miscellaneous static methods that operate on lists and on iterators.


Method Summary
static int getSize(List list)
          Returns the size of the list, that is, 0 if list is null, or its size otherwise.
static int getSize(Object[] array)
          Returns the size of the array, that is, 0 if array is null, or its length otherwise.
static List Sort(Iterator iter, Comparator c)
          Creates a list, adds the elements of an iterator to it and then sorts the list according to a sort order defined by way of a comparator.
static Vector vector(Iterator iter)
          Deprecated. As of JRules 7.0, there is no point in using Vectors.
static Vector vector(List list)
          Deprecated. As of JRules 7.0, there is no point in using Vectors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

Sort

public static List Sort(Iterator iter,
                        Comparator c)
Creates a list, adds the elements of an iterator to it and then sorts the list according to a sort order defined by way of a comparator.

Returns:
the sorted list.

vector

public static Vector vector(Iterator iter)
Deprecated. As of JRules 7.0, there is no point in using Vectors.

Creates and returns a vector in which all the elements of an iterator have been added.


vector

public static Vector vector(List list)
Deprecated. As of JRules 7.0, there is no point in using Vectors.

Creates and returns a vector in which all the elements of a list have been added.


getSize

public static int getSize(List list)
Returns the size of the list, that is, 0 if list is null, or its size otherwise.

Since:
JRules 6.0
Parameters:
list - A list. It can be null.
Returns:
The size of the list.

getSize

public static int getSize(Object[] array)
Returns the size of the array, that is, 0 if array is null, or its length otherwise.

Since:
JRules 6.0
Parameters:
array - An array. It can be null.
Returns:
The size of the array.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013