Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.udo.cs.miningmart.m4.core
Class ParameterArray

    java.lang.Object
      edu.udo.cs.miningmart.m4.core.ParameterArray

All Implemented Interfaces:
  ParameterArray, java.io.Serializable

public class ParameterArray
extends java.lang.Object
implements java.io.Serializable, ParameterArray

This class serves as the container to store a single or multiple `Parameter`s in the parameter dictionary in class `Step`. The aggregation of `Parameter`s by this class is according to the operators access by name, where arrays of `Parameter` objects and optional parameters are possible. Please note, that the name is not stored in this object, but the object is stored in the `ParamDict` dictionary with the parameter name used by the operator as the key.

Version:
  $Id: ParameterArray.java,v 1.4 2006/04/11 14:10:14 euler Exp $
Author:
  Martin Scholz
See Also:
  Serialized Form

Constructor Summary
`ParameterArray(short parameterType)`
`ParameterArray(java.lang.String parameterType)`

Method Summary
`void` | `addParameter(Parameter par)` Extends the array of ParameterObjects by the specified Parameter.
`ParameterObject[]` | `getParameterObjectArray()` Active getter of the `parameterObjectArray`.
`java.util.Collection` | `getParameters()`
`short` | `getParameterType()` Gets the parameterType.
`java.lang.String` | `getParameterTypeS()` Gets the parameterType as the String constant used in class DB.
`boolean` | `hasParameter(Parameter par)`
`boolean` | `removeParameter(Parameter par)` Inverts the `addParameter(Parameter)` functionality.
`int` | `size()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParameterArray

    public ParameterArray(short parameterType)
                   throws ParameterError

### ParameterArray

    public ParameterArray(java.lang.String parameterType)
                   throws ParameterError

Method Detail

### addParameter

    public void addParameter(Parameter par)
                      throws M4Exception

  Extends the array of ParameterObjects by the specified Parameter. Note, that the type of this Parameter has to be the same or a subclass of this ParameterArray's type! The `Parameter` will also have a reference to this object after it has been added by this method. After each invokation the array of ParameterObjects is invalidated and the active getter of this field will set it anew.

  Specified by:
    `addParameter` in interface `ParameterArray`
  Parameters:
    `par` - the `Parameter` to be added
  Throws:
    `M4Exception`

### removeParameter

    public boolean removeParameter(Parameter par)
                            throws M4Exception

  Inverts the `addParameter(Parameter)` functionality. The object specified is removed from the internal list of embedded `Paramter`s. The reference of the `Parameter` to this object is also deleted.

  Specified by:
    `removeParameter` in interface `ParameterArray`
  Parameters:
    `par` - the `Parameter` to be deleted
  Returns:
    `true` if the object could be deleted
  Throws:
    `M4Exception`

### hasParameter

    public boolean hasParameter(Parameter par)
                         throws M4Exception

  Specified by:
    `hasParameter` in interface `ParameterArray`
  Parameters:
    `par` - a `Parameter`
  Returns:
    `true` if a `Parameter` with the same ID is found in this `ParameterArray`
  Throws:
    `M4Exception`

### getParameterType

    public short getParameterType()

  Gets the parameterType.

  Specified by:
    `getParameterType` in interface `ParameterArray`
  Returns:
    Returns a short

### getParameterTypeS

    public java.lang.String getParameterTypeS()

  Gets the parameterType as the String constant used in class DB.

  Specified by:
    `getParameterTypeS` in interface `ParameterArray`
  Returns:
    Returns a String

### size

    public int size()

  Specified by:
    `size` in interface `ParameterArray`
  Returns:
    the number of `Parameter`s this `ParameterArray` contains.

### getParameters

    public java.util.Collection getParameters()

  Specified by:
    `getParameters` in interface `ParameterArray`
  Returns:
    the `Collection` of embedded `Parameter` objects.

### getParameterObjectArray

    public ParameterObject[] getParameterObjectArray()
                                              throws M4Exception

  Active getter of the `parameterObjectArray`.

  Specified by:
    `getParameterObjectArray` in interface `ParameterArray`
  Returns:
    Returns a `ParameterObject[]`
  Throws:
    `M4Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005