ilog.rules.factory

Class IlrPropertyList

  • java.lang.Object
    • ilog.rules.factory.IlrPropertyList
  • All Implemented Interfaces:
    java.io.Serializable


    public class IlrPropertyList
    extends java.lang.Object
    implements java.io.Serializable
    This class is used to manage the properties attached to a ruleset or a rule. An IlrRulesetFactory and an IlrRuleFactory can have properties. They can be defined in the rule language or by API through the methods of this class.

    Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short term storage or RMI between applications running the version of IBM Decision Server.

    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  IlrPropertyList.Entry
      This class is an entry of a property list.
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrPropertyList()
      Constructs a property list.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void clear()
      Removes all the properties.
      boolean containsKey(java.lang.String key)
      Tests if the list contains a property.
      boolean containsValue(java.lang.Object value)
      Tests if the list contains a property of value value.
      IlrPropertyList copy()
      Returns a property list containing the same properties as this object.
      java.util.Enumeration elements()
      Returns an enumeration of entries in this list.
      IlrPropertyList.Entry get(java.lang.String key)
      Gets a property by name.
      java.lang.Object get(java.lang.String key, java.lang.Object def)
      Returns the object value of the specified property.
      boolean getBoolean(java.lang.String key, boolean def)
      Returns the Boolean value of the specified property.
      char getChar(java.lang.String key, char def)
      Returns the character value of the specified property.
      double getDouble(java.lang.String key, double def)
      Returns the double value of the specified property.
      float getFloat(java.lang.String key, float def)
      Returns the float value of the specified property.
      java.util.ArrayList getHierarchicalProperties()
      Returns the properties that are hierarchical properties.
      int getInt(java.lang.String key, int def)
      Returns the integer value of the specified property.
      long getLong(java.lang.String key, long def)
      Returns the long value of the specified property.
      java.lang.String getString(java.lang.String key, java.lang.String def)
      Returns the string value of the specified property.
      boolean isEmpty()
      Tests if the property list is empty.
      IlrPropertyList.Entry put(java.lang.String key, java.lang.Object value)
      Adds a property to the list.
      IlrPropertyList.Entry put(java.lang.String key, java.lang.Object value, boolean hierarchical)
      Adds a property to the list.
      void putAll(IlrPropertyList properties)
      Puts all the entries of properties in this property list.
      void putBoolean(java.lang.String key, boolean value)
      Adds a property to the list and initializes it with a Boolean value.
      void putChar(java.lang.String key, char value)
      Adds a property to the list and initializes it with a character value.
      void putDouble(java.lang.String key, double value)
      Adds a property to the list and initializes it with a double value.
      void putFloat(java.lang.String key, float value)
      Adds a property to the list and initializes it with a float value.
      void putInt(java.lang.String key, int value)
      Adds a property to the list and initializes it with an integer value.
      void putLong(java.lang.String key, long value)
      Adds a property to the list and initializes it with a long value.
      void putString(java.lang.String key, java.lang.String value)
      Adds a property to the list and initializes it with a string value.
      IlrPropertyList.Entry remove(java.lang.String key)
      Removes a property by name.
      int size()
      Gets the number of properties in the list.
      • Methods inherited from class java.lang.Object

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

      • IlrPropertyList

        public IlrPropertyList()
        Constructs a property list. Initially the property list contains no properties.
    • Method Detail

      • size

        public int size()
        Gets the number of properties in the list.
        Returns:
        The number of properties in the list.
      • isEmpty

        public boolean isEmpty()
        Tests if the property list is empty.
        Returns:
        true if the list contains no properties. Otherwise, it returns false.
      • elements

        public java.util.Enumeration elements()
        Returns an enumeration of entries in this list.
        Returns:
        An enumeration of entries.
      • clear

        public void clear()
        Removes all the properties.
      • copy

        public IlrPropertyList copy()
        Returns a property list containing the same properties as this object.
        Returns:
        A property list.
      • putAll

        public void putAll(IlrPropertyList properties)
        Puts all the entries of properties in this property list.
        Parameters:
        properties - The property list for which each entry will be added to this list.
      • containsKey

        public boolean containsKey(java.lang.String key)
        Tests if the list contains a property.
        Parameters:
        key - The property name.
        Returns:
        true if the list contains the property. Otherwise, it returns false.
      • containsValue

        public boolean containsValue(java.lang.Object value)
        Tests if the list contains a property of value value.
        Parameters:
        value - A property value.
        Returns:
        true if the list contains a property of value value. Otherwise, it returns false.
      • remove

        public IlrPropertyList.Entry remove(java.lang.String key)
        Removes a property by name.
        Parameters:
        key - The property name.
        Returns:
        The entry of the property, or null if the property does not exist.
      • get

        public IlrPropertyList.Entry get(java.lang.String key)
        Gets a property by name.
        Parameters:
        key - The property name.
        Returns:
        The entry of that property, or null if the list does not contain the property.
      • get

        public java.lang.Object get(java.lang.String key,
                           java.lang.Object def)
        Returns the object value of the specified property. If the property is not defined, the given default value is returned.
        Parameters:
        key - The property name.
        def - The default value to return if the property is not defined.
      • getString

        public java.lang.String getString(java.lang.String key,
                                 java.lang.String def)
        Returns the string value of the specified property. If the property is not defined, the given default value is returned.
        Parameters:
        key - The property name.
        def - The default value to return if the property is not defined.
      • getBoolean

        public boolean getBoolean(java.lang.String key,
                         boolean def)
        Returns the Boolean value of the specified property. If the property is not defined, the given default value is returned.
        Parameters:
        key - The property name.
        def - The default value to return if the property is not defined.
      • getChar

        public char getChar(java.lang.String key,
                   char def)
        Returns the character value of the specified property. If the property is not defined, the given default value is returned.
        Parameters:
        key - The property name.
        def - The default value to return if the property is not defined.
      • getInt

        public int getInt(java.lang.String key,
                 int def)
        Returns the integer value of the specified property. If the property is not defined, the given default value is returned.
        Parameters:
        key - The property name.
        def - The default value to return if the property is not defined.
      • getLong

        public long getLong(java.lang.String key,
                   long def)
        Returns the long value of the specified property. If the property is not defined, the given default value is returned.
        Parameters:
        key - The property name.
        def - The default value to return if the property is not defined.
      • getFloat

        public float getFloat(java.lang.String key,
                     float def)
        Returns the float value of the specified property. If the property is not defined, the given default value is returned.
        Parameters:
        key - The property name.
        def - The default value to return if the property is not defined.
      • getDouble

        public double getDouble(java.lang.String key,
                       double def)
        Returns the double value of the specified property. If the property is not defined, the given default value is returned.
        Parameters:
        key - The property name.
        def - The default value to return if the property is not defined.
      • put

        public IlrPropertyList.Entry put(java.lang.String key,
                                java.lang.Object value)
        Adds a property to the list. If a property of the name already exists, its value will be replaced. In the case of a hierarchical property, use the API IlrPropertyList.put(String key,Object value, boolean hierarchical).
        Parameters:
        key - The property name.
        value - The property value.
        Returns:
        The entry of the property.
      • put

        public IlrPropertyList.Entry put(java.lang.String key,
                                java.lang.Object value,
                                boolean hierarchical)
        Adds a property to the list. If a property of the name already exists, its value will be replaced. This API must be used to add a hierarchical property.
        Parameters:
        key - The property name.
        value - The property value.
        hierarchical - true if the property is hierarchical.
        Returns:
        The entry of the property.
      • putString

        public void putString(java.lang.String key,
                     java.lang.String value)
        Adds a property to the list and initializes it with a string value.
        Parameters:
        key - The property name.
        value - The property value.
      • putBoolean

        public void putBoolean(java.lang.String key,
                      boolean value)
        Adds a property to the list and initializes it with a Boolean value.
        Parameters:
        key - The property name.
        value - The property value.
      • putChar

        public void putChar(java.lang.String key,
                   char value)
        Adds a property to the list and initializes it with a character value.
        Parameters:
        key - The property name.
        value - The property value.
      • putInt

        public void putInt(java.lang.String key,
                  int value)
        Adds a property to the list and initializes it with an integer value.
        Parameters:
        key - The property name.
        value - The property value.
      • putLong

        public void putLong(java.lang.String key,
                   long value)
        Adds a property to the list and initializes it with a long value.
        Parameters:
        key - The property name.
        value - The property value.
      • putFloat

        public void putFloat(java.lang.String key,
                    float value)
        Adds a property to the list and initializes it with a float value.
        Parameters:
        key - The property name.
        value - The property value.
      • putDouble

        public void putDouble(java.lang.String key,
                     double value)
        Adds a property to the list and initializes it with a double value.
        Parameters:
        key - The property name.
        value - The property value.
      • getHierarchicalProperties

        public java.util.ArrayList getHierarchicalProperties()
        Returns the properties that are hierarchical properties.
        Returns:
        A list that contains all the hierarchical properties.

© Copyright IBM Corp. 1987, 2017