Class NamedObjectFactory<F extends NamedObjectFactory<F,NMR,NMD,OBJ>,NMR extends ObjectNamerOps<NMD>,NMD extends NamedObjectOps,OBJ extends NMD>

java.lang.Object
org.bzdev.obnaming.NamedObjectFactory<F,NMR,NMD,OBJ>
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
DefaultNOFactory, SimObjectFactory

public abstract class NamedObjectFactory<F extends NamedObjectFactory<F,NMR,NMD,OBJ>,NMR extends ObjectNamerOps<NMD>,NMD extends NamedObjectOps,OBJ extends NMD> extends Object implements Cloneable
Base class for factories for named objects. Factories provide a uniform interface for creating and configuring objects. Configuration parameters are manipulated by 'set', 'add', and 'clear' methods, and methods can create multiple objects in a single operation. If the object namer associated with the factory supports scripting and if it supports scripting-based configuration, a scripting language can be used to configure the factory. The default behavior is to use a scripting-language object to configure the factory when the object namer is a subclass of ScriptingContext. For the Javascript (EMCAScript) case, the object used to configure the factory is either a Javascript object or a Javascript array that is passed to a factory method named "configure". For an array, each element is processed in order. For a Javascript object, which is a collection of attribute-value pairs, the names of the attribute correspond to the parameter names used in set or add methods. There are several reserved names and these are treated specially. The reserved attribute names are
  • "withKey" - the value is the name of a set/add key. In this case, the key is used by the current object and any nested objects (objects indicated by a "config" attribute). A "withIndex" attribute is not allowed.
  • "withIndex " - The value of this parameter is a Javascript array. The attribute "withKey" is not allowed.
  • "withPrefix " - a prefix is defined. For the value of "config" or each element of the value of "withIndex", each non-reserved attribute name NAME is replaced with PREFIX.NAME, where PREFIX is the value of the "prefix" attribute. If other "withPrefix" attributes are available due to nesting, all of them are concatenated (outer first), with a period separating them.
  • "config" - this indicates that a nested object or array of objects should be used as well. Nested objects inherit "withKey" and "withPrefix" attributes.
Depending on the parameter, factory's are configured using 'set' or 'add' methods. Factory methods allow one to determine which should be used and this choice is handled transparently by the 'configure' method. For the case where 'add' is appropriate. the value associated with a parameter can be an array providing a set of values to add. For example consider a factory with parameters "foo", "bar" and keyed parameters "timeline.foo" and "timeline.bar" that use integer keys. The following code
      factory.configure({foo: 10, bar: 20})
 
is equivalent to
      factory.set("foo", 10);
      factory.set("bar", 20);
 
The following code
      factory.configure({withPrefix: "timeline",
                         withKey: "b",
                         config: {foo: 10, bar: 20}});
 
is equivalent to
      factory.set("timeline.foo", "b", 10);
      factory.set("timeline.bar", "b", 20);
 
The following code
      factory.configure({withPrefix: "timeline",
                         withIndex: [{foo: 10}, {foo: 20}]);
 
is equivalent to
      factory.set("timeline.foo", 0, 10);
      factory.set("timeline.foo", 1, 20);
 
The following code
      factory.configure({withPrefix: "timeline",
                         withIndex: [{foo: 10}, {foo: 20}]
 
is simply a shorthand notation for
      factory.configure([{withKey 0, config: {"timeline.foo": 10}},
                        {withKey 1, config: {"timeline.bar": 20}}]);
 
If the factory has a parameter "foobar" that represents a set of integers, the code
      factory.configure({foobar: [10, 20, 30]});
 
can be used. This is equivalent to
      factory.add("foobar", 10);
      factory.add("foobar", 20);
      factory.add("foobar", 30);
 

Each supported scripting language will use a syntax appropriate to it. Python uses essentially the same syntax, but all the attribute names must be quoted.

To simplify the creation of a large number of objects in which some parameters may differ, a factory can be written to make use of random variables. In this case, one can provide the factory with either a primitive value (int, long, double, or boolean) or a corresponding random variable, which will be used to obtain a separate value for each object created.

Factories are defined by a set of named parameters. An array of Parm objects and/or a ParmManager defines the parameters, and usually the array or ParmManager is passed to initParms in a constructor for each class in a class hierarchy that defines some of a factory's parameters. If multiple arrays and ParmManager objects are used, each requires a separate call to initParms. For each Parm, there will typically be a corresponding field to hold its value. This is set or cleared (clearing may mean restoring a default value) by using an anonymous class that overrides the appropriate ParmParser methods. When a ParmManager is used, it will typically have been created by a Java annotation processor, using the following annotations:

  • FactoryParmManager. This annotation applies to a factory's class definition and indicates the name of a ParmManager for the factory to use.
  • PrimitiveParm. This annotation applies to fields defined by a factory, and provides data needed to generate a Parm instance. The fields are simple types: int or Integer, long or Long, boolean or Boolean, double or Double, String, any enumeration, a named object (which implements NamedObjectOps), or a set of the above.
  • KeyedPrimitiveParm: a table with a key that may be an integer, long, String, or named object and a value suitable for a a primitive parameter. The corresponding object must be an implementation of java.util.Map.
  • CompoundParmType. This annotation applies to a class that will be used to define a parameter with a compound name. The parameters the annotated class defines must be primitive parameters.
  • CompoundParm. This defines a parameter whose value is an instance of a class annotated by CompoundParmType and that will be used as the first component of compound parameters whose second components are the names of primitive parameters that a CompoundParmType's class define.
  • KeyedCompoundParms provide the same keys as a KeyedPrimitiveParm but the value type of the map is a class annotated by CompoundParmType.
While there can be cases that require special treatment, it is usually far simpler to have an annotation processor generate a ParmManager and use that instead of constructing a Parm manually. The subclass of ParmManager created when a FactoryParmManager annotation is used has uses the same generic types as the factory it helps configure. These must be used with the same names and in the same order as in the factory definition, and will generally differ from the type parameters shown for the documentation for this class. As an example,

     @FactoryParmManager(value="AbstractFooFactoryPM")
     public abstract class AbstractFooFactory<OBJ extends Foo> {
        ...
        AbstractFooFactory<OBJ> pm;
        public AbstractFooFactory(Animation2D a2d) {
           pm = new AbstractFooFactoryPM<OBJ>(this);
           initParms(pm, AbstractFooFactory.class);
        }
     }
 
would be appropriate for a factory for a subclass of some object defined in the anim2d package --- the class created by the annotation processor is defined as follows:

     class AbstractFooFactoryPM<OBJ extends Foo>
        extends ParmManager<AbstractFooFactory<Obj>>
     {
        ...
     }
 
If the type for the ParmManager is not expressed exactly as shown above, type-erasure issues will cause a compile-time error.

A factory that is not an abstract class must implement the method newObject, which takes a string as an argument. Abstract factories should not implement this method. Any factory may implement the following methods to initialize named objects (shown in the order in which they will be called):

  • startObjectCreation(): called at the start of a sequence of operations to create one or more objects. The method newObject will be called after this method has been called.
  • initObject(OBJ): called to initialize an object after it has been created.
  • arrayInit(T[],int,int) where T is a type parameter: called once when an array of objects has been created and initObject has been called for each of those objects.
  • doAfterInits(OBJ): called for each object being created after initObject and possibly arrayInit has been called.
  • endObjectCreation(): called at the end of a sequence of operations to create one or more objects.
These methods generally are expected to invoke the same method on its superclass as the first statement in each method that is implemented. In the simplest cases, one might only implement initObject, with each (factory) superclass responsible for initializing parameters it has defined.

Generally a factory should implement the method clear(), which is should start by calling super.clear(). The rest of this method should clear the existing fields by restoring them to their default values. As a convenience, when a parm manager is used, each parm manager provides a method name setDefaults that takes the current factory as its argument. Calling the setDefaults method will automatically reset the fields associated with parameters defined via annotations for the current class.

Any subclass that overrides an "add" or "set" method defined by this class is expected to indicate an error by throwing an instance of NamedObjectFactory.ConfigException, and can generate this exception by using methods named newConfigExceptionInstance:

For these methods, the String argument is the name of a parameter, the Object method (for the 4 methods that take three arguments) is a key or index, and the Exception methods indicate the exceptions that caused the error. Object-namer classes that are created using the annotations defined in the package org.bzdev.obnaming.annotations will treat instances of NamedObjectFactory.ConfigException specially.

Finally, all factories that are not abstract should be listed in a file name META-INF/services/org.bzdev.obnaming.NamedObjectFactory that should be included in the same JAR file as the factory to facilitate locating factories and listing them.

Note: when used with a security manager, this class needs the runtime permission getClassLoader due to using ResourceBundle.getBundle methods that take a class loader as an argument.

  • Constructor Details

    • NamedObjectFactory

      protected NamedObjectFactory(NMR namer)
      Constructor. Subclasses must call this constructor. If the object namer is null, the factory will not be able to create objects, but can be queried to get parameters, etc.
      Parameters:
      namer - the object namer
  • Method Details

    • newConfigExceptionInstance

      protected NamedObjectFactory.ConfigException newConfigExceptionInstance(String name, IllegalArgumentException e)
      Create a ConfigException without a key for an IllegalArgumentException. Subclasses that override an "add" or "set" method (which should occur only in atypical cases) are expected to start with a 'try' statement that catches any IllegalArgumentException and throws an exception created with this method or the variant that specifies a key.
      Parameters:
      name - the parameter name passed to an "add" or "set" method
      e - the exception
      Returns:
      the new exception
    • newConfigExceptionInstance

      protected NamedObjectFactory.ConfigException newConfigExceptionInstance(String name, IllegalStateException e)
      Create a ConfigException without a key for an IllegalStateException. Subclasses that override an "add" or "set" method (which should occur only in atypical cases) are expected to start with a 'try' statement that catches any IllegalStateException and throws an exception created with this method or the variant that specifies a key.
      Parameters:
      name - the parameter name passed to an "add" or "set" method
      e - the exception
      Returns:
      the new exception
    • newConfigExceptionInstance

      protected NamedObjectFactory.ConfigException newConfigExceptionInstance(String name, UnsupportedOperationException e)
      Create a ConfigException without a key for an UnsupportedOperationException. Subclasses that override an "add" or "set" method (which should occur only in atypical cases) are expected to start with a 'try' statement that catches any UnsupportedOperationException and throws an exception created with this method or the variant that does not specify a key.
      Parameters:
      name - the parameter name passed to an "add" or "set" method
      e - the exception
      Returns:
      the new exception
    • newConfigExceptionInstance

      protected NamedObjectFactory.ConfigException newConfigExceptionInstance(String name, Object key, IllegalArgumentException e)
      Create a ConfigException with a key for an IllegalArgumentException. Subclasses that override an "add" or "set" method (which should occur only in atypical cases) are expected to start with a 'try' statement that catches any IllegalArgumentException and throws an exception created with this method or the variant that does not specify a key.
      Parameters:
      name - the parameter name passed to an "add" or "set" method
      key - the key or index passed to an 'add" or "set" method
      e - the exception
      Returns:
      the new exception
    • newConfigExceptionInstance

      protected NamedObjectFactory.ConfigException newConfigExceptionInstance(String name, Object key, IllegalStateException e)
      Create a ConfigException with a key for an IllegalStateException. Subclasses that override an "add" or "set" method (which should occur only in atypical cases) are expected to start with a 'try' statement that catches any IllegalStateException and throws an exception created with this method or the variant that does not specify a key.
      Parameters:
      name - the parameter name passed to an "add" or "set" method
      key - the key or index passed to an 'add" or "set" method
      e - the exception
      Returns:
      the new exception
    • newConfigExceptionInstance

      protected NamedObjectFactory.ConfigException newConfigExceptionInstance(String name, Object key, UnsupportedOperationException e)
      Create a ConfigException with a key for an UnsuportedOperationException. Subclasses that override an "add" or "set" method (which should occur only in atypical cases) are expected to start with a 'try' statement that catches any UnsupportedOperationException and throws an exception created with this method or the variant that does not specify a key.
      Parameters:
      name - the parameter name passed to an "add" or "set" method
      key - the key or index passed to an 'add" or "set" method
      e - the exception
      Returns:
      a new exception
    • newConfigExceptionInstance

      protected static NamedObjectFactory.ConfigException newConfigExceptionInstance(String name, Object key, IndexOutOfBoundsException e)
      Create a ConfigException with a key for an IndexOutOfBoundsException. Subclasses that override an "add" or "set" method (which should occur only in atypical cases) are expected to start with a 'try' statement that catches any IndexOutOfBoundsException and throws an exception created with this method or the variant that does not specify a key.
      Parameters:
      name - the parameter name passed to an "add" or "set" method
      key - the key or index passed to an 'add" or "set" method
      e - the exception
      Returns:
      the new exception
    • containsParm

      public boolean containsParm(String name)
      Determine if a parameter name exists.
      Parameters:
      name - the name of the parameter
      Returns:
      true if the parameter name exists; false otherwise
    • getObjectNamer

      public NMR getObjectNamer()
      Get the factory's object namer.
      Returns:
      the object namer
    • newInstance

      public static NamedObjectFactory newInstance(ObjectNamerOps namer, String className) throws IllegalArgumentException
      Create a new instance of a NamedObjectFactory given a factory class name. The factory must have a single-argument constructor that takes its object namer as its argument.
      Parameters:
      namer - the object namer for the factory
      className - the fully-qualified class name of a factory.
      Returns:
      the new named object factory
      Throws:
      IllegalArgumentException - the factory is not listed in a META-INF/services/org.bzdev.NamedObjectFactory resource or the class name does not refer to subclass of NamedObjectFactory
    • newInstance

      public static NamedObjectFactory newInstance(ObjectNamerOps namer, Class clazz) throws IllegalArgumentException
      Create a new instance of a NamedObjectFactory given a factory class. The factory must have a single-argument constructor that takes its object namer as its argument.
      Parameters:
      namer - the object namer for the factory
      clazz - the factory's class
      Returns:
      the new named object factory
      Throws:
      IllegalArgumentException - the factory is not listed in a META-INF/services/org.bzdev.NamedObjectFactory resource or the class name does not refer to subclass of NamedObjectFactory
    • getTemplateKeyMapForFactories

      public static TemplateProcessor.KeyMap getTemplateKeyMapForFactories()
      Get a key map for listing the parameters for all factories specified as factory-listing service providers. These factories must not be abstract classes, and must appear, one per line, in a file named
      META-INF/services/org.bzdev.obnaming.NamedObjectFactory
      The service provided is the ability to list factory parameters.

      The key map contains a single entry named "factories" whose value is a list, each element of which is a key map returned by calling getTemplateKeyMap() for a given factory.

      Returns:
      the key map
      See Also:
    • getTemplateKeyMapForFactories

      public static TemplateProcessor.KeyMap getTemplateKeyMapForFactories(String pattern)
      Get a key map for listing the parameters for all factories specified as factory-listing service providers, restricted to those factories whose fully-qualified class names match a pattern. The pattern is a regular expression in which a '*' indicates an arbitrary number of characters that do not include a period '.', where '|" indicates alternatives, and where a subexpression bracketed by '(' and ')' indicates grouping. Thus, the pattern
      org.bzdev.(anim2d|drama).*
      will match all listed factories in the packages org.bzdev.anim2d and org.bzdev.drama. These factories must not be abstract classes, and must appear, one per line, in a file named
      META-INF/services/org.bzdev.obnaming.NamedObjectFactory
      and each entry in this file must be a subclass of NamedObjectFactory. The service provided is the ability to list factory parameters.

      The key map contains a single entry named "factories" whose value is a list, each element of which is a key map returned by calling getTemplateKeyMap() for a given factory.

      Parameters:
      pattern - the search pattern
      Returns:
      the key map
      See Also:
    • getTemplateKeyMapForFactories

      public static TemplateProcessor.KeyMap getTemplateKeyMapForFactories(Set<NamedObjectFactory> factories)
      Get a template key map for a set of factories.
      Parameters:
      factories - the set of factories
      Returns:
      the key map
      See Also:
    • getListedFactories

      public static Set<NamedObjectFactory> getListedFactories(String pattern)
      Get a set of factories that are factory-listing service providers, restricted to those factories whose fully-qualified class names match a pattern. The pattern is a regular expression in which a '*' indicates an arbitrary number of characters that do not include a period '.', where '|" indicates alternatives, and where a subexpression bracketed by '(' and ')' indicates grouping. As a special case, '**' indicates any sequence of characters other than new lines (which never appear in a factory name), and must end the pattern when used. Thus, the pattern
      org.bzdev.(anim2d|drama).*
      will match all listed factories in the packages org.bzdev.anim2d and org.bzdev.drama.* Similarly,
      org.bzdev.**
      will match all factories whose fully qualified names start with "org.bzdev." These factories must not be abstract classes, and must appear, one per line, in a file named
      META-INF/services/org.bzdev.obnaming.NamedObjectFactory
      and each entry in this file must be a subclass of NamedObjectFactory. The service provided is the ability to list factory parameters.

      The key map contains a single entry named "factories" whose value is a list, each element of which is a key map returned by calling getTemplateKeyMap() for a given factory.

      Parameters:
      pattern - the search pattern
      Returns:
      a set of factories.
      See Also:
    • addJDoc

      public static void addJDoc(URL apiURL) throws IOException
      Indicate that a URL refers to an Javadoc API directory. The tables modified by this method are used by the method getTemplateKeyMap().
      Parameters:
      apiURL - the URL
      Throws:
      IOException - the operation failed.
    • addJDoc

      public static void addJDoc(URL apiURL, URL offlineURL) throws IOException
      Indicate that a URL refers to an Javadoc API directory. The argument offlineURL is used to read the the element-list or package-list files in an API directory, and is provided for cases where the URL specified by apiURL either does not yet exist or is not currently accessible. The tables modified by this method are used by the method getTemplateKeyMap().
      Parameters:
      apiURL - the URL for the Javadoc API directory
      offlineURL - the URL for an off-line copy of the Javadoc API directory
      Throws:
      IOException - the operation failed.
    • setDocAPIBase

      public static void setDocAPIBase(URL url)
      Set the base URL. The base URL is the common portion of a URL shared by multiple sets of API documentation. Typically, this will be used when documenation for multiple APIs all have a common parent directory. When possible, relative URLs will be used, simplyfing deployment on multiple servers. The value set by this method is used by the method getTemplateKeyMap().
      Parameters:
      url - the base URL
    • setTarget

      public static void setTarget(String htmlTarget)
      Set the target to use in an HTML <A> element. This field is used when a link should be displayed in a specified frame. The value set by this method is used by the method getTemplateKeyMap().
      Parameters:
      htmlTarget - the target; null if there is none.
    • getTemplateKeyMap

      public TemplateProcessor.KeyMap getTemplateKeyMap()
      Get a template-processor key map for a factory's parameters. The keymap contains the following entries:
      • factory - the fully qualified class name of the factory.
      • factoryAPI - the fully qualified class name of the factory wrapped by an <A> element that points to the Javadoc API documentation for the factory. The URL will begin with a base URL configured by the method addJDoc(java.net.URL). or addJDoc(java.net.URL,java.net.URL).
      • factoryDoc the fully qualified class name of the factory wrapped by an <A> element that points to the parameter documentation for the factory.
      • parameters - a list of keymaps for the parameters used by the factory, each element of which contains the following:
        • factory - the fully qualified class name of a factory.
        • factoryPackage - the name of the package in which the factory is defined.
        • nextPackageEntry - this element is added by code in the lsnof command and is not available elsewhere. It provides a list entry giving the package name when that has changed from the previous entry.
        • factoryAPI - the HTML expression for a link to the API documentation (usually created by javadoc) for a factory. The fully-qualified class name will be displayed. The <A> element generated may include a target attribute.
        • factoryDoc - the HTML expression for a link to the factory documentation (usually created by lsnof). From a base url, the value will be the fully qualified class name for the factory with each '.' separating a package from the next component replaced with a '/' and with ".html" appended at the end.
        • name - the name of the parameter.
        • label - the parameter's label.
        • definingFactoryClass - the factory class in which the parameter is defined.
        • type - the type of the parameters (the string "(none)" if there is none)
        • typeHTML - the type of the parameters (the string "(none)" if there is none). When a URL to javadoc documentation for the class exists a link to that documentation will be provided by wrapping the name in an <A> element. This link refers to a location in the same document in which the link appears.
        • rvmode - the random-variable mode.
        • keytype - the type of a key (the string "(none)" if there is none).
        • keytypeHTML - the type of a key (the string "(none)" if there is none). When a URL to javadoc documentation for the class exists a link to that documentation will be provided by wrapping the name in an <A> element.
        • range - the range of values that the parameter will accept (an empty string if there is none).
        • description - a tool-tip description of the parameter.
        • descriptionHTML - a tool-tip description of the parameter in HTML.
        • hasDoc - a map that, when present, indicates that a doc entry exists.
        • noDoc - a map that, when present, indicates that a doc entry does not exist.
        • doc - the value provided by a doc resource bundle for the parameter. This must be an HTML fragment that can be placed between <DIV> and </DIV>.
        In both the description and descriptionHTML cases, a starting <html> and ending </html> indicate that the text is formatted using HTML. In this case, any <br> directives will be replaced with whitespace (a newline followed by two tabs). For HTML, the description will replace <JDOC> with <CODE> and </JDOC> with </CODE>. This is also true for the descriptionHTML case, but in that case the content of the JDOC element, which should be a fully-qualified class name optionally followed by a crosshatch ("#") and a fragment, will be changed into a link suitable to Javadoc documentation. The class name and fragment must follow the same conventions used by javadoc.
      Returns:
      the template-processor key map for this factory
    • parmPrefixes

      public Set<String> parmPrefixes()
      Return a set of prefixes used in compound parameters.
      Returns:
      an unmodifiable set of prefixes
    • getParmPrefix

      public String getParmPrefix(String parmName)
      Get a parameter prefix of a compound parameter given the parameter name.
      Parameters:
      parmName - the name of the parameter
      Returns:
      the parameter's prefix; null if it is not a compound parameter.
    • addLabelResourceBundle

      protected void addLabelResourceBundle(String baseName, Class clazz) throws NullPointerException, MissingResourceException
      Add a resource bundle for labels associated with configuration parameters. The second argument (clazz) is used to determine the class loader for the resource bundle. It can be any class whose class loader can find the resource bundle, but typically one will use a factory class name (or parm-manager class name), with the corresponding resource or property file in the same directory or jar file as the factory class being loaded or initialized. The baseName argument may be one of the following:
      • a simple class name. In this case, if clazz is in a named package, the package name of clazz, followed by a period, will be prepended to baseName.
      • a fully qualified class name. In this case, baseName is used as is, but a run time check will ensure that the package component of the name matches clazz's package or a subpackage of clazz's package named "lpack".
      • an asterisk followed by a period, followed by a qualified or simple class name. In this case the asterisk is replaced with clazz's package name, which must not be the unnamed package. The resource bundle must be in the same package as clazz or in a subpackage named lpack.
      Regardless of how baseName is specified, if the resource bundle is not in the same package as clazz, it must be in a subpackage whose first component is named "lpack" (for language pack). A subclass should call this method within the constructor.
      Parameters:
      baseName - the name of a class representing this resource
      clazz - the class of the factory, parm manager, or a class annotated with CompoundParmType, adding the resource bundle
      Throws:
      NullPointerException - an argument was null
      MissingResourceException - the first argument did not refer to a resource that could be found
      SecurityException - the packages for clazz and baseName differ or clazz's package is not the package of the factory or one of its superclasses
    • addLabelResourceBundle

      protected void addLabelResourceBundle(String keyPrefix, String delimiter, String baseName, Class clazz) throws NullPointerException, MissingResourceException
      Add a resource bundle for labels associated with keyed configuration parameters. The fourth argument (clazz) is used to determine the class loader for the resource bundle. It can be any class whose class loader can find the resource bundle, but typically one will use a factory class name (or parm-manager class name), with the corresponding resource or property file in the same directory or jar file as the factory class being loaded or initialized. The baseName argument may be one of the following:
      • a simple class name. In this case, if clazz is in a named package, the package name of clazz, followed by a period, will be prepended to baseName.
      • a fully qualified class name. In this case, baseName is used as is, but a run time check will ensure that the package component of the name matches clazz's package or a subpackage of clazz's package named "lpack".
      • an asterisk followed by a period, followed by a qualified or simple class name. In this case the asterisk is replaced with clazz's package name, which must not be the unnamed package. The resource bundle must be in the same package as clazz or in a subpackage named lpack.
      Regardless of how baseName is specified, if the resource bundle is not in the same package as clazz, it must be in a subpackage whose first component is named "lpack" (for language pack). A subclass should call this method within the constructor.
      Parameters:
      keyPrefix - the prefix for a keyed parameter name
      delimiter - the delimiter for a keyed parameter name
      baseName - the name of a class representing this resource
      clazz - the class of the factory, parm manager, or a class annotated with CompoundParmType, adding the resource bundle
      Throws:
      NullPointerException - an argument was null
      MissingResourceException - the first argument did not refer to a resource that could be found
      SecurityException - the packages for clazz and baseName differ or clazz's package is not the package of the factory or one of its superclasses
    • getLabel

      public String getLabel(String name) throws IllegalArgumentException
      Get a label. This will typically be used by a GUI to provide a label for a text field or other parameter.
      Parameters:
      name - the name of a parameter
      Returns:
      a string providing the label
      Throws:
      IllegalArgumentException
    • addTipResourceBundle

      protected void addTipResourceBundle(String baseName, Class clazz) throws NullPointerException, MissingResourceException
      Add a resource bundle for tips associated with configuration entries. The second argument (clazz) is used to determine the class loader for the resource bundle. It can be any class whose class loader can find the resource bundle, but typically one will use a factory class name (or parm-manager class name), with the corresponding resource bundle (or property file) in the same directory or jar file as the factory class being loaded or initialized. The baseName argument may be one of the following:
      • a simple class name. In this case, if clazz is in a named package, the package name if clazz, followed by a period will be prepended to baseName.
      • a fully qualified class name. In this case, baseName is used as is, but a run time check will ensure that the package component of the name matches clazz's package.
      • an asterisks followed by a period, followed by a qualified or simple class name. In this case, clazz's package name is prepended to baseName when clazz is in a named package. Otherwise the leading ".*" is removed from baseName.
      Regardless of how baseName is specified, if the resource bundle is not in the same package as clazz, it must be in a subpackage whose first component is named "lpack" (for language pack). A subclass should call this method within the constructor.
      Parameters:
      baseName - the name of a class representing this resource
      clazz - the class of the factory, parm manager, or a class annotated with CompoundParmType, adding the resource bundle
      Throws:
      NullPointerException - an argument was null
      MissingResourceException - the first argument did not refer to a resource that could be found
      SecurityException - the packages for clazz and baseName differ or clazz's package is not the package of the factory or one of its superclasses
    • addTipResourceBundle

      protected void addTipResourceBundle(String keyPrefix, String delimiter, String baseName, Class clazz) throws NullPointerException, MissingResourceException
      Add a resource bundle for tips associated with compound configuration entries. The fourth argument (clazz) is used to determine the class loader for the resource bundle. It can be any class whose class loader can find the resource bundle, but typically one will use a factory class name (or parm-manager class name), with the corresponding resource or property file in the same directory or jar file as the factory class being loaded or initialized. The baseName argument may be one of the following:
      • a simple class name. In this case, if clazz is in a named package, the package name if clazz, followed by a period will be prepended to baseName.
      • a fully qualified class name. In this case, baseName is used as is, but a run time check will ensure that the package component of the name matches clazz's package.
      • an asterisks followed by a period, followed by a qualified or simple class name. In this case, clazz's package name is prepended to baseName when clazz is in a named package. Otherwise the leading ".*" is removed from baseName.
      Regardless of how baseName is specified, if the resource bundle is not in the same package as clazz, it must be in a subpackage whose first component is named "lpack" (for language pack). A subclass should call this method within the constructor.
      Parameters:
      keyPrefix - the prefix for a keyed parameter name
      delimiter - the delimiter for a keyed parameter name
      baseName - the name of a class representing this resource
      clazz - the class of the factory, parm manager, or a class annotated with CompoundParmType, adding the resource bundle
      Throws:
      NullPointerException - an argument was null
      MissingResourceException - the first argument did not refer to a resource that could be found
      SecurityException - the packages for clazz and baseName differ or clazz's package is not the package of the factory or one of its superclasses
    • getTip

      public String getTip(String name) throws IllegalArgumentException
      Get a tip. This will typically be used by a GUI to provide a tip describing a text field or other parameter.
      Parameters:
      name - the name of a parameter
      Returns:
      a string providing the tip.
      Throws:
      IllegalArgumentException
    • addDocResourceBundle

      protected void addDocResourceBundle(String baseName, Class clazz) throws NullPointerException, MissingResourceException
      Add a resource bundle for docs associated with configuration entries. The second argument (clazz) is used to determine the class loader for the resource bundle. It can be any class whose class loader can find the resource bundle, but typically one will use a factory class name (or parm-manager class name), with the corresponding resource bundle (or property file) in the same directory or jar file as the factory class being loaded or initialized. The baseName argument may be one of the following:
      • a simple class name. In this case, if clazz is in a named package, the package name if clazz, followed by a period will be prepended to baseName.
      • a fully qualified class name. In this case, baseName is used as is, but a run time check will ensure that the package component of the name matches clazz's package.
      • an asterisks followed by a period, followed by a qualified or simple class name. In this case, clazz's package name is prepended to baseName when clazz is in a named package. Otherwise the leading ".*" is removed from baseName.
      Regardless of how baseName is specified, if the resource bundle is not in the same package as clazz, it must be in a subpackage whose first component is named "lpack" (for language pack). A subclass should call this method within the constructor.
      Parameters:
      baseName - the name of a class representing this resource
      clazz - the class of the factory, parm manager, or a class annotated with CompoundParmType, adding the resource bundle
      Throws:
      NullPointerException - an argument was null
      MissingResourceException - the first argument did not refer to a resource that could be found
      SecurityException - the packages for clazz and baseName differ or clazz's package is not the package of the factory or one of its superclasses
    • addDocResourceBundle

      protected void addDocResourceBundle(String keyPrefix, String delimiter, String baseName, Class clazz) throws NullPointerException, MissingResourceException
      Add a resource bundle for docs associated with compound configuration entries. The fourth argument (clazz) is used to determine the class loader for the resource bundle. It can be any class whose class loader can find the resource bundle, but typically one will use a factory class name (or parm-manager class name), with the corresponding resource or property file in the same directory or jar file as the factory class being loaded or initialized. The baseName argument may be one of the following:
      • a simple class name. In this case, if clazz is in a named package, the package name if clazz, followed by a period will be prepended to baseName.
      • a fully qualified class name. In this case, baseName is used as is, but a run time check will ensure that the package component of the name matches clazz's package.
      • an asterisks followed by a period, followed by a qualified or simple class name. In this case, clazz's package name is prepended to baseName when clazz is in a named package. Otherwise the leading ".*" is removed from baseName.
      Regardless of how baseName is specified, if the resource bundle is not in the same package as clazz, it must be in a subpackage whose first component is named "lpack" (for language pack). A subclass should call this method within the constructor.
      Parameters:
      keyPrefix - the prefix for a keyed parameter name
      delimiter - the delimiter for a keyed parameter name
      baseName - the name of a class representing this resource
      clazz - the class of the factory, parm manager, or a class annotated with CompoundParmType, adding the resource bundle
      Throws:
      NullPointerException - an argument was null
      MissingResourceException - the first argument did not refer to a resource that could be found
      SecurityException - the packages for clazz and baseName differ or clazz's package is not the package of the factory or one of its superclasses
    • getDoc

      public String getDoc(String name) throws IllegalArgumentException
      Get a doc. This will typically be used by a GUI to provide a doc describing a text field or other parameter.
      Parameters:
      name - the name of a parameter
      Returns:
      a string providing the doc.
      Throws:
      IllegalArgumentException
    • setLayoutResource

      protected void setLayoutResource(String resource)
      Set the name of a resource specifying how a GUI should configure this factory.
      Parameters:
      resource - the name for the resource
    • setLayoutResource

      protected void setLayoutResource(Class<?> clazz, String extension)
      Set the name of a resource specifying how a GUI should configure this factory given its class. The resource name will be the same as the class name but with each '.' replaced with a '/', and with ".xml" added as an extension.
      Parameters:
      clazz - the class
      extension - a resource extension (excluding the '.' separating it from the rest of the resource name)
      Throws:
      NullPointerException - an argument was null
      IllegalArgumentException - after trimming leading and trailing whitespace, the extension was an empty string
    • getLayoutResource

      public String getLayoutResource()
      Return the name of the resource specifying how a GUI should configure this factory.
      Returns:
      the resource; null if there is none
    • initParms

      protected void initParms(Parm[] parms, Class<?> clazz)
      Initialize parameters table. A subclass must call this method, typically inside a constructor. The clazz argument will normally be the name of the constructor with ".class" appended to it.
      Parameters:
      parms - an array of parameters
      clazz - the class defining a set of parameters, typically the name of the class whose constructor calls initParms
    • initParm

      protected void initParm(Parm parm, Class<?> clazz)
      Initialize parameters table by adding a single parameter. A subclass must call this method, typically inside a constructor. The clazz argument will normally be the name of the constructor with ".class" appended to it.
      Parameters:
      parm - the parameter
      clazz - the class defining a set of parameters, typically the name of the class whose constructor calls initParms
    • initParms

      protected void initParms(ParmManager<? extends F> manager, Class<?> clazz)
      Initialize parameters specified by a ParmManager. A subclass must call this method, typically inside a constructor. The clazz argument will normally be the name of the constructor with ".class" appended to it.

      Note: when a parm manager is created by using the annotation FactoryParmManager, the generic type parameters will match those of the factory being annotated. These must have the same type-parameter names as in the factory's class definition, as shown above: subclasses of ParmManager do not necessarily use the same type parameters that ParmManager uses.

      Parameters:
      manager - a parameter manager specifying parameters
      clazz - the class defining this set of parameters, typically the name of the class whose constructor calls initParms
    • removeParms

      protected void removeParms(String[] parmNames)
      Remove parameters previously named. This method is intended for cases in which the parameter names provided by a superclass should not be used by a subclass. A subclass must call this method, typically inside a constructor.
      Parameters:
      parmNames - the names of the parameters to remove
    • removeParm

      protected void removeParm(String name)
      Remove a single parameter that was previously named. A subclass must call this method, typically inside a constructor.
      Parameters:
      name - the names of the parameters to remove
    • parmNames

      Get the names of parameters.
      Returns:
      an enumeration of the allowed parameter names
    • parmNameSet

      public Set<String> parmNameSet()
      Get a set of the names of entries. This method produces a snapshot of the parameter names that existed when the method was called. While creating a new set is not particularly efficient, this method is rarely used. It is intended for finding parameter names in lexical order.
      Returns:
      a set of the allowed parameter names
    • keyType

      public Class<?> keyType(String name) throws IllegalArgumentException
      Determine the type of a key, if any.
      Parameters:
      name - the name of the value
      Returns:
      the class representing the key type; null if there is no key for this parameter
      Throws:
      IllegalArgumentException - there is no entry for the specified name
    • getFactoryClass

      public Class<?> getFactoryClass(String name) throws IllegalArgumentException
      Get the class for the factory that defined a parameter name
      Parameters:
      name - the name of the value
      Returns:
      the class of the factory that defined the parameter; null if unknown
      Throws:
      IllegalArgumentException - there is no entry for the specified name
    • getParmKeyType

      public ParmKeyType getParmKeyType(String name) throws IllegalArgumentException
      Get the parameter-key-type data for a parameter.
      Parameters:
      name - the name of a parameter
      Returns:
      the ParmKeyType object describing the key for this parameter; null if the key is not a compound key
      Throws:
      IllegalArgumentException - there is no entry for the specified name
    • getType

      public Class<?> getType(String name) throws IllegalArgumentException
      Determine the type of a parameter's value.
      Parameters:
      name - the name of the value
      Returns:
      a class denoting the parameter's value's type, which can be int.class, double.class, long.class, boolean.class, String.class, the class name of a named object that the object namer accepts (in which case the type is really String.class as a corresponding value is a name of an interned named object), or null if there is no value
      Throws:
      IllegalArgumentException - there is no entry for the specified name
    • getRVMode

      public boolean getRVMode(String name) throws IllegalArgumentException
      Get the random-variable mode.
      Parameters:
      name - the name of an entry
      Returns:
      true if a random variable used in a call to set should be considered to be the value used to initialize an object; false if that random variable is used to generate the value used to initialize an object
      Throws:
      IllegalArgumentException - there is no entry for the specified name
    • getGLB

      public Number getGLB(String name) throws IllegalArgumentException
      Get the GLB (Greatest Lower Bound) for the allowed range of values.
      Parameters:
      name - the name of an entry
      Returns:
      the greatest lower bound; null if none is defined
      Throws:
      IllegalArgumentException - there is no entry for the specified name
    • glbInRange

      public boolean glbInRange(String name) throws IllegalArgumentException
      Determine if the GLB (Greatest Lower Bound) for the range of allowed values is in that set.
      Parameters:
      name - the name of an entry
      Returns:
      true if the GLB is in the allowed range; false if not; undefined if there a GLB was not defined.
      Throws:
      IllegalArgumentException - there is no entry for the specified name
    • getLUB

      public Number getLUB(String name) throws IllegalArgumentException
      Get the LUB (Least Upper Bound) for the allowed range of values.
      Parameters:
      name - the name of an entry
      Returns:
      the greatest lower bound; null if none is defined
      Throws:
      IllegalArgumentException - there is no entry for the specified name
    • lubInRange

      public boolean lubInRange(String name) throws IllegalArgumentException
      Determine if the LUB (Least Upper Bound) for the range of allowed values is in that set.
      Parameters:
      name - the name of an entry
      Returns:
      true if the GLB is in the allowed range; false if not; undefined if there a GLB was not defined.
      Throws:
      IllegalArgumentException - there is no entry for the specified name
    • unset

      Clear an entry and restore it to the default value.
      Parameters:
      name - the name of the entry
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • clear

      public void clear()
      Clear all entries and restore to default values. Note: each subclass that implements this method should call super.clear(). Any subclass that defines parameters should call this method in order to restore the parameters to their default values. When an annotation processor is used for some parameters, those parameters can be restored to their default value by calling the parm manager's setDefaults method with the factory as its argument.
    • add

      public void add(String name, String value) throws NamedObjectFactory.ConfigException
      Add a value provided as a string to as set of strings.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • add

      public void add(String name, NamedObjectOps value) throws NamedObjectFactory.ConfigException
      Add a value provided as a named object to a set of named objects.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • add

      public void add(String name, Enum<?> value) throws NamedObjectFactory.ConfigException
      Add a value provided as an enumeration to a set of enumerations.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • add

      public void add(String name, int value) throws NamedObjectFactory.ConfigException
      Add a value provided as an int to a set of integers.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • add

      public void add(String name, long value) throws NamedObjectFactory.ConfigException
      Add a value provided as a long to a set of integers. The long-integer argument will be converted to an int as this method is provided to support polymorphism.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • add

      public void add(String name, double value) throws NamedObjectFactory.ConfigException
      Add a value provided as a double to a set of integers. The double-precision value will be converted to an int as this method is provided to support polymorphism.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • add

      public void add(String name, Object key, Object subkey) throws NamedObjectFactory.ConfigException
      Add a compound key provided as two objects. This is handles a special case - a compound key with two components - and is equivalent to
          Object compoundKey[] = {key, subkey};
          add(name, compoundKey);
       
      Parameters:
      name - the name of the entry
      key - the first key
      subkey - the second key
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • add

      public void add(String name, Object[] value) throws NamedObjectFactory.ConfigException
      Add a value provided as an array of objects representing a compound key. If the array length is larger than 1, the parameter must use a ParmKeyType to describe its keys.
      Parameters:
      name - the name of the entry
      value - an array containing the keys
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
      See Also:
    • mustAdd

      public boolean mustAdd(String name)
      Test if a name must be added rather than set.
      Parameters:
      name - the name of the entry or property
      Returns:
      true if it must be added; false otherwise
    • canAdd3

      public boolean canAdd3(String name)
      Test if a the three-argument form of add can be used.
      Parameters:
      name - the name of the entry or property
      Returns:
      true if the three-argument form of add can be used; false otherwise
    • isClearOnly

      public boolean isClearOnly(String name)
      Determine if a parameter is a clear-only parameter. A clear-only parameter does not support set or add methods, just clear methods. A few such methods are provided in order to allow users to conveniently clear a table.
      Parameters:
      name - the name of the paraemter
      Returns:
      true if the parameter is clear only; otherwise false
    • set

      public void set(String name, String value) throws NamedObjectFactory.ConfigException
      Set a value provided as a string.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, NamedObjectOps value) throws NamedObjectFactory.ConfigException
      Set a value provided as a named object.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, Enum<?> value) throws NamedObjectFactory.ConfigException
      Set a value provided as an enumeration type.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, int value) throws NamedObjectFactory.ConfigException
      Set a value provided as an int.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, IntegerRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-valued random variable.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, IntegerRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-random-variable-valued random variable.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, long value) throws NamedObjectFactory.ConfigException
      Set a value provided as a long.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, LongRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an long-valued random variable.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      IllegalArgumentException - an argument is out of bounds or the name does not match a parameter
      UnsupportedOperationException - the factory does not allow this method to be used
      IllegalStateException - the factory is not in a state for which this value may be parsed and entered
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, LongRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as a long-random-variable-valued random variable.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, double value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, DoubleRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double-valued random variable.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, DoubleRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double-random-variable-valued random variable.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, boolean value) throws NamedObjectFactory.ConfigException
      Set a value provided as a boolean.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, BooleanRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an boolean-valued random variable.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • set

      public void set(String name, BooleanRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an boolean-random-variable-valued random variable.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered
    • unset

      public void unset(String name, int index) throws IllegalArgumentException, UnsupportedOperationException
      Unset an entry with an index and restore it to the default value.
      Parameters:
      name - the name of the entry
      index - the index for the entry
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • unset

      Unset an entry with a named-object key and restore it to the default value.
      Parameters:
      name - the name of the entry
      key - the key
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • unset

      public void unset(String name, Enum<?> key) throws IllegalArgumentException, UnsupportedOperationException
      Unset an entry with an enumeration key and restore it to the default value.
      Parameters:
      name - the name of the entry
      key - the key for the entry
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • unset

      public void unset(String name, Object[] key) throws IllegalArgumentException, UnsupportedOperationException
      Unset an entry with a compound key and restore it to the default value.
      Parameters:
      name - the name of the entry
      key - the compound key for the entry
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • set

      public void set(String name, int index, String value) throws NamedObjectFactory.ConfigException
      Set a value provided as a string, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, NamedObjectOps value) throws NamedObjectFactory.ConfigException
      Set a value provided as a named object, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, Enum<?> value) throws NamedObjectFactory.ConfigException
      Set a value provided as an enumeration type, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, int value) throws NamedObjectFactory.ConfigException
      Set a value provided as an int, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, IntegerRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-valued random variable, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, IntegerRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-random-variable-valued random variable, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, long value) throws NamedObjectFactory.ConfigException
      Set a value provided as a long, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, LongRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an long-valued random variable, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, LongRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an long-random-variable-valued random variable, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, double value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, DoubleRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an double-valued random variable, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, DoubleRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an double-random-variable-valued random variable, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, boolean value) throws NamedObjectFactory.ConfigException
      Set a value provided as a boolean, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, BooleanRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an boolean-valued random variable, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, int index, BooleanRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an boolean-random-variable-valued random variable, given an index.
      Parameters:
      name - the name of the entry
      index - the index
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal range
    • set

      public void set(String name, NamedObjectOps key, String value) throws NamedObjectFactory.ConfigException
      Set a value provided as a string, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, NamedObjectOps key, NamedObjectOps value) throws NamedObjectFactory.ConfigException
      Set a value provided as a named object, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, NamedObjectOps key, Enum<?> value) throws NamedObjectFactory.ConfigException
      Set a value provided as an enumeration type, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, NamedObjectOps key, int value) throws NamedObjectFactory.ConfigException
      Set a value provided as an int, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      Set a value provided as an integer-valued random variable, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      Set a value provided as an integer-random-variable-valued random variable, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, NamedObjectOps key, long value) throws NamedObjectFactory.ConfigException
      Set a value provided as a long, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, NamedObjectOps key, LongRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an long-valued random variable, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      Set a value provided as an long-random-variable-valued random variable, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, NamedObjectOps key, double value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      Set a value provided as an double-valued random variable, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      Set a value provided as an double-random-variable-valued random variable, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, NamedObjectOps key, boolean value) throws NamedObjectFactory.ConfigException
      Set a value provided as a boolean, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      Set a value provided as an boolean-valued random variable, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      Set a value provided as an boolean-random-variable-valued random variable, given a named-object key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, String value) throws NamedObjectFactory.ConfigException
      Set a value provided as a string, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, NamedObjectOps value) throws NamedObjectFactory.ConfigException
      Set a value provided as a named object, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, Enum<?> value) throws NamedObjectFactory.ConfigException
      Set a value provided as an enumeration type, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, int value) throws NamedObjectFactory.ConfigException
      Set a value provided as an int, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, IntegerRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-valued random variable, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, IntegerRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-random-variable-valued random variable, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, long value) throws NamedObjectFactory.ConfigException
      Set a value provided as a long, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, LongRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an long-valued random variable, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, LongRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an long-random-variable-valued random variable, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, double value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, DoubleRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an double-valued random variable, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, DoubleRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an double-random-variable-valued random variable, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, boolean value) throws NamedObjectFactory.ConfigException
      Set a value provided as a boolean, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, BooleanRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an boolean-valued random variable, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Enum<?> key, BooleanRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an boolean-random-variable-valued random variable, given an enumeration key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, String value) throws NamedObjectFactory.ConfigException
      Set a value provided as a string, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, NamedObjectOps value) throws NamedObjectFactory.ConfigException
      Set a value provided as a named object, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, Enum<?> value) throws NamedObjectFactory.ConfigException
      Set a value provided as an enumeration type, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, int value) throws NamedObjectFactory.ConfigException
      Set a value provided as an int, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, IntegerRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-valued random variable, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, IntegerRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-random-variable-valued random variable, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, long value) throws NamedObjectFactory.ConfigException
      Set a value provided as a long, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, LongRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an long-valued random variable, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, LongRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an long-random-variable-valued random variable, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, double value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, DoubleRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an double-valued random variable, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, DoubleRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an double-random-variable-valued random variable, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, boolean value) throws NamedObjectFactory.ConfigException
      Set a value provided as a boolean, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, BooleanRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an boolean-valued random variable, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, Object[] key, BooleanRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an boolean-random-variable-valued random variable, given a compound key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, String value) throws NamedObjectFactory.ConfigException
      Set a value provided as a string, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, NamedObjectOps value) throws NamedObjectFactory.ConfigException
      Set a value provided as a named object, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, Enum<?> value) throws NamedObjectFactory.ConfigException
      Set a value provided as an enumeration, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, int value) throws NamedObjectFactory.ConfigException
      Set a value provided as an int, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, IntegerRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-valued random variable, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, IntegerRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as an integer-random-variable-valued random variable, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, long value) throws NamedObjectFactory.ConfigException
      Set a value provided as a long, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, LongRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as a long-valued random variable, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, LongRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as a long-random-variable-valued random variable, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, double value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, DoubleRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double-valued random variable, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, DoubleRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as a double-random-variable-valued random variable, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, boolean value) throws NamedObjectFactory.ConfigException
      Set a value provided as a boolean, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, BooleanRandomVariable value) throws NamedObjectFactory.ConfigException
      Set a value provided as a boolean-valued random variable, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • set

      public void set(String name, String key, BooleanRandomVariableRV value) throws NamedObjectFactory.ConfigException
      Set a value provided as a boolean-random-variable-valued random variable, given a key.
      Parameters:
      name - the name of the entry
      key - the key
      value - the value of the object
      Throws:
      NamedObjectFactory.ConfigException - an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the key is not in a legal range
    • clear

      public void clear(String name)
      Clear keys by removing all keys associated with a parameter name or restore a parameter to its default value.
      Parameters:
      name - the name of the entry
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • remove

      public void remove(String name, String key) throws IllegalArgumentException, UnsupportedOperationException
      Remove an entry with a key from a set of strings.
      Parameters:
      name - the name of the entry
      key - the key
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • remove

      Remove an entry with a named-object key from a set of named objects.
      Parameters:
      name - the name of the entry
      key - the key
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • remove

      public void remove(String name, Enum<?> key) throws IllegalArgumentException, UnsupportedOperationException
      Remove an entry with an enumeration key from a set of enumerations.
      Parameters:
      name - the name of the entry
      key - the key
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • remove

      public void remove(String name, int key)
      Remove an entry with an index from a set of integers.
      Parameters:
      name - the name of the entry
      key - the key
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • remove

      public void remove(String name, long value)
      Remove a value provided as a long from a set of integers. The long-integer argument will be converted to an int as this method is provided to support polymorphism.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      IllegalArgumentException - an argument is out of bounds or the name does not match a parameter
      UnsupportedOperationException - the factory does not allow this method to be used
      IllegalStateException - the factory is not in a state for which this value may be parsed and entered
    • remove

      public void remove(String name, double value)
      Remove a value provided as a double from a set of integers. The double-precision value will be converted to an int as this method is provided to support polymorphism.
      Parameters:
      name - the name of the entry
      value - the value of the object
      Throws:
      IllegalArgumentException - an argument is out of bounds or the name does not match a parameter
      UnsupportedOperationException - the factory does not allow this method to be used
      IllegalStateException - the factory is not in a state for which this value may be parsed and entered
    • remove

      public void remove(String name, Object key, Object subkey)
      Remove a compound key provided as two objects, undoing the corresponding add operation. This is handles a special case - a compound key with two components - and is equivalent to
          Object compoundKey[] = {key, subkey};
          remove(name, compoundKey);
       
      Parameters:
      name - the name of the entry
      key - the first key
      subkey - the second key
      Throws:
      IllegalArgumentException - an argument is out of bounds or the name does not match a parameter
      UnsupportedOperationException - the factory does not allow this method to be used
    • remove

      public void remove(String name, Object[] key)
      Remove an entry with a compound key, undoing the corresponding add operation.
      Parameters:
      name - the name of the entry
      key - the key
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • unset

      public void unset(String name, String key) throws IllegalArgumentException, UnsupportedOperationException
      Unset an entry with a key and restore it to the default value.
      Parameters:
      name - the name of the entry
      key - the key
      Throws:
      IllegalArgumentException - the argument does not match an entry
      UnsupportedOperationException - the factory does not allow this entry to be removed
    • configureSupported

      public boolean configureSupported()
      Determine if the configure method is supported by this factory's object namer.
      Returns:
      true if configure(<Configuration Object>) is supported; false otherwise
    • configure

      public void configure(Object scriptObject) throws UnsupportedOperationException, IllegalArgumentException
      Configure a factory. This is an optional operation. The default behavior is that the object namer handles the operation and throws an UnsupportedOperationException if it cannot. The existing configuration will not be cleared.
      Parameters:
      scriptObject - an object in a scripting language, or instances of JSObject or JSArray, representing a specification for how this factory should be configured
      Throws:
      UnsupportedOperationException - the factory cannot be configured using a script object
      IllegalArgumentException - the scriptObject is ill formed
    • isRandomVariable

      public boolean isRandomVariable(Object obj)
      Determine if an object is an instance of RandomVariable<?>. This is intended for supporting scripting languages that might not have full visibility into the Java type system. It just returns (obj instanceof RandomVariable<?>).
      Parameters:
      obj - the object
      Returns:
      true if it is an instance of RandomVariable<?> or one of RandomVariable's subclasses; false otherwise
    • isNamedObject

      public boolean isNamedObject(Object obj)
      Determine if an object is an instance of a named object. This is intended for supporting scripting languages that might not have full visibility into the Java type system.
      Parameters:
      obj - the object
      Returns:
      true if it is an instance of the base name object for the object namer associated with this factory, or one of that named object's subclasses; false otherwise
    • setNameRoot

      public void setNameRoot(String nameRoot)
      Set the initial part of a name to use when creating objects. The name provided will be prefaced and followed with "_".
      Parameters:
      nameRoot - the factory-unique part of a name
    • getNextName

      protected String getNextName()
      Generate a named-object name.
      Returns:
      a named-object name
    • getNextNameIndex

      protected long getNextNameIndex()
      Generate a unique index to append to a string to generate a name.
      Returns:
      the index
    • startObjectCreation

      protected void startObjectCreation()
      Start a sequence of creation of new objects. This method is called at the start of the methods createObject and createObjects unless these methods are overridden. The default method does nothing. Subclasses that override this method must start with the statement "super.startObjectCreation();".
    • endObjectCreation

      protected void endObjectCreation()
      End a sequence of creation of new objects. This method is called at the end of the methods createObject and createObjects unless these methods are overridden, including the case of an abnormal termination. The default method does nothing. Subclasses that override this method must start with the statement "super.endObjectCreation();".
    • newObject

      protected abstract OBJ newObject(String name)
      Construct a new object. The object will not be initialized. This method is called by createObject() and createObjects unless these methods are overridden. Subclasses should call willIntern() to determine if the object will interned or not, and getObjectNamer() to find the object namer. Some subclasses (e.g., org.devqsim.SimObjectFactory) provide a method that will return the object namer cast to the type needed by constructors. In the case of SimObjectFactory, this method is named getSimulation(). For a subclass of SimObjectFactory to create a new object of type Foo, newObject will execute the expression
      
            new Foo(getSimulation(), name, willIntern())
       
      or an equivalent expression, where name is the argument passed to newObject.
      Parameters:
      name - the name of the object to be created
      Returns:
      the new object
      See Also:
    • initObject

      protected void initObject(OBJ object)
      Initialize an object. This method will call the methods for the object necessary to initialize it based on how the factory was configured, and is called by createObject() and createObjects unless these methods are overridden. The default method does nothing. Subclasses that override this method to provide subclass-specific initializations must start with the statement "super.initObject(object);".
      Parameters:
      object - the object to initialize
    • arrayInit

      protected <T> void arrayInit(T[] array, int offset, int n)
      Apply additional initializations after an array of objects has been created and each initialized by calling initObject(obj). The default implementation does nothing. This method is called from methods named createObjects after initObject has been called on each of the objects that will be created. Subclasses should that override this method to provide subclass-specific initializations must start with the statement "super.arrayInit(array, offset, n);".
      Type Parameters:
      T - the type of the objects that are created
      Parameters:
      array - an array of objects that were created and initialized
      offset - the starting point in the array
      n - the number of elements to initialize, starting at the offset
    • doAfterInits

      protected void doAfterInits(OBJ object)
      Final initialization code. Called on each object being initialized after all other initialization steps have been completed (i.e., after initObject and possibly arrayInit). This will be called the methods named createObject and createObjects unless these methods are overridden. The default method does nothing. Subclasses that override this method to provide subclass-specific initializations must start with the statement "super.doAfterInits(object);".
      Parameters:
      object - the object whose initialization is to be completed
    • setInterned

      public void setInterned(boolean value)
      Specify if objects created will be interned. An object is interned if it appears in an object namer's tables and can thus be looked up by name.
      Parameters:
      value - true if the objects will be interned; false if not
    • willIntern

      public boolean willIntern()
      Determine if a created object will be interned. An object is interned if it appears in an object namer's tables and can thus be looked up by name.
      Returns:
      true if it will be interned, false if not
    • createObject

      public OBJ createObject()
      Create a named object of the type this factory supports with the object's name generated by the factory. Generally this method should not be overridden as the object is actually created by newObject(). The factory configuration is not altered by a call to this method.
      Returns:
      a named object
      See Also:
    • createObject

      public OBJ createObject(String name)
      Create a named object of the type this factory supports. Generally this method should not be overridden as the object is actually created by newObject(). The factory configuration is not altered by a call to this method.
      Parameters:
      name - the name of the object
      Returns:
      a named object
    • createObject

      public OBJ createObject(String name, Object scriptObject)
      Create a named object of the type this factory supports, modifying the factory configuration. The existing configuration, if any, will be cleared and then replaced with the configuration specified by the scriptObject argument Generally this method should not be overridden as the object is actually created by newObject().
      Parameters:
      name - the name of the object
      scriptObject - an object in a scripting language representing a specification for how this factory should be configured
      Returns:
      a named object
    • createObject

      public OBJ createObject(String name, boolean clearConfig, Object scriptObject)
      Create a named object of the type this factory supports, setting or modifying the factory configuration. Generally this method should not be overridden as the object is actually created by newObject(). Regardless of whether the existing configuation is cleared, the configuration after the scriptObject argument is processed will not be changed by this method after the object is created.
      Parameters:
      name - the name of the object
      clearConfig - true if the existing configuration should be cleared; false otherwise
      scriptObject - an object in a scripting language representing a specification for how this factory should be configured
      Returns:
      a named object
    • createObjects

      public <T> T[] createObjects(T[] array)
      Create named objects with the names generated by the factory and the number of objects determined by an array size.
      Type Parameters:
      T - the type of the created objects
      Parameters:
      array - the array into which the created objects are to be stored if large enough; otherwise a new array of the same type is allocated
      Returns:
      the objects that were created
      Throws:
      ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every object created
      NullPointerException - if the specified array is null
    • createObjects

      public <T> T[] createObjects(T[] array, int n)
      Create named objects with the names generated by the factory. Generally this method should not be overridden as each object is actually created by newObject().
      Type Parameters:
      T - the type of the created objects
      Parameters:
      array - the array into which the created objects are to be stored if large enough; otherwise a new array of the same type is allocated
      n - the number of objects to create
      Returns:
      an array containing the newly created objects
      Throws:
      ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every object created
      NullPointerException - if the specified array is null
    • createObjects

      public <T> T[] createObjects(T[] array, int offset, int n)
      Create named objects given an offset with the names generated by the factory. Generally this method should not be overridden as each object is actually created by newObject(). This method is intended for cases in which multiple calls to createObjects will be used to add entries to an array.
      Type Parameters:
      T - the type of the created objects
      Parameters:
      array - the array into which the created objects are to be stored
      offset - the offset into the array at which to start
      n - the number of objects to create
      Returns:
      an array containing the newly created objects
      Throws:
      ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every object created
      NullPointerException - if the specified array is null
      IllegalArgumentException - the array length was too short given the offset
    • createObjects

      public <T> T[] createObjects(T[] array, String root)
      Create named objects with the number of objects determined by an array.
      Type Parameters:
      T - the type of the created objects
      Parameters:
      array - the array into which the created objects are to be stored if large enough - otherwise a new array of the same type is allocated; object names will consist of a root name, followed by an "_", followed by a number
      root - the root of a name
      Returns:
      the objects that were created
      Throws:
      ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every object created
      NullPointerException - if the specified array is null
    • createObjects

      public <T> T[] createObjects(T[] array, String root, int n)
      Create named objects. Generally this method should not be overridden as each object is actually created by newObject().
      Type Parameters:
      T - the type of the created objects
      Parameters:
      array - the array into which the created objects are to be stored if large enough; otherwise a new array of the same type is allocated; object names will consist of a root name, followed by an "_", followed by a number
      root - the root of a name
      n - the number of objects to create
      Returns:
      an array containing the newly created objects
      Throws:
      ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every object created
      NullPointerException - if the specified array is null
    • createObjects

      public <T> T[] createObjects(T[] array, String root, int offset, int n)
      Create named objects. Generally this method should not be overridden as each object is actually created by newObject(). This method is intended for cases where multiple calls to createObjects will be used to add entries to an array.
      Type Parameters:
      T - the type of the created objects
      Parameters:
      array - the array into which the created objects are to be stored; object names will consist of a root name, followed by an "_", followed by a number
      root - the root of a name
      offset - the offset into the array at which to start
      n - the number of objects to create
      Returns:
      an array containing the newly created objects at indices starting with the offset
      Throws:
      ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every object created
      NullPointerException - if the specified array is null
      IllegalArgumentException - the array length was too short given the offset