ilog.rules.bom.util

Class IlrSelectors

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


  • public class IlrSelectors
    extends java.lang.Object
    This is a utility class which has miscellaneous static methods which combine given selectors to produce a new selector, or apply a given selector to an iterator or to a list producing a new filtered iterator.

    This class also provides some predefined selectors accessible through static fields.

    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrSelectors() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static java.util.Iterator dynamicTypes(IlrObjectModel objectModel)
      This static method returns an iterator over the dynamic types of the given object model.
      static java.util.Iterator dynamicTypes(java.util.Iterator typeIter)
      This static method filters the elements of the given iterator.
      static java.util.Iterator Select(java.util.Iterator iter, IlrSelector selector)
      This static method filters the elements of a given iterator.
      static java.util.Iterator Select(java.util.List list, IlrSelector selector)
      This static method filters the elements of a given list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • AllElements

        public static final IlrSelector AllElements
        A selector which does not filter out any element. It serves as a default selector.
      • StaticMembers

        public static final IlrSelector StaticMembers
        A selector which filters out non static members (members for which the IlrMember.isStatic method returns false).
      • InterfaceClasses

        public static final IlrSelector InterfaceClasses
        A selector which filters out non interface classes (classes for which the IlrClass.isInterface() method returns false).
      • DynamicClasses

        public static final IlrSelector DynamicClasses
        A selector which filters out non dynamic classes (classes for which the IlrType.getNativeClass() method returns null).
    • Constructor Detail

      • IlrSelectors

        public IlrSelectors()
    • Method Detail

      • dynamicTypes

        public static java.util.Iterator dynamicTypes(java.util.Iterator typeIter)
        This static method filters the elements of the given iterator. It returns an iterator over a subset of these elements : those which represent dynamic types (as opposed to Java classes). The dynamic types are those for which the IlrType.getNativeClass() method returns null.
        Parameters:
        typeIter - an iterator over types.
        Returns:
        an iterator over those elements of typeIter which are not bound to an actual Java class.
      • dynamicTypes

        public static java.util.Iterator dynamicTypes(IlrObjectModel objectModel)
        This static method returns an iterator over the dynamic types of the given object model. The dynamic types are those for which the IlrType.getNativeClass() method returns null.
        Parameters:
        objectModel - an object model.
        Returns:
        an iterator over those types of objectModel which are not bound to an actual Java class.
      • Select

        public static java.util.Iterator Select(java.util.Iterator iter,
                                IlrSelector selector)
        This static method filters the elements of a given iterator. It returns an iterator over a subset of these elements : those which satisfy the given selector.
        Parameters:
        iter - an iterator over model elements
        selector - a selector which will be used to filter the elements of the iter parameter
        Returns:
        an iterator over those elements of iter which satisfy the selector
      • Select

        public static java.util.Iterator Select(java.util.List list,
                                IlrSelector selector)
        This static method filters the elements of a given list. It returns an iterator over a subset of these elements : those which satisfy the given selector.
        Parameters:
        list - an list of model elements
        selector - a selector which will be used to filter the elements of the list parameter
        Returns:
        an iterator over those elements of list which satisfy the selector

© Copyright IBM Corp. 1987, 2017