ilog.rules.bom.util

Class IlrCollections

  • java.lang.Object
    • ilog.rules.bom.util.IlrCollections


  • public final class IlrCollections
    extends java.lang.Object
    This is a utility class which has miscellaneous static methods that operate on lists and on iterators.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static int getSize(java.util.List list)
      Returns the size of the list, that is, 0 if list is null, or its size otherwise.
      static int getSize(java.lang.Object[] array)
      Returns the size of the array, that is, 0 if array is null, or its length otherwise.
      static java.util.List Sort(java.util.Iterator iter, java.util.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 java.util.Vector vector(java.util.Iterator iter)
      Deprecated. 
      As of JRules 7.0, there is no point in using Vectors.
      static java.util.Vector vector(java.util.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 java.util.List Sort(java.util.Iterator iter,
                          java.util.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 java.util.Vector vector(java.util.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 java.util.Vector vector(java.util.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(java.util.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(java.lang.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.

© Copyright IBM Corp. 1987, 2017