org.mmbase.util.functions
Class AutodefiningParameters

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<Object>
          extended by org.mmbase.util.functions.Parameters
              extended by org.mmbase.util.functions.AutodefiningParameters
All Implemented Interfaces:
Serializable, Iterable<Object>, Collection<Object>, List<Object>

public class AutodefiningParameters
extends Parameters

If there is no Parameter definition array available you could try it with this specialization, which does not need one. You loose al checking on type and availability. It should only be used as a last fall back and accompanied by warnings.

Since:
MMBase-1.7
Version:
$Id: AutodefiningParameters.java 35524 2009-05-29 13:40:17Z michiel $
Author:
Michiel Meeuwissen
See Also:
Parameter, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mmbase.util.functions.Parameters
Parameters.SerializableAbstractMap<K,V>
 
Field Summary
 
Fields inherited from class org.mmbase.util.functions.Parameters
autoCasting, backing, definition, patternBacking, patternLimit, toIndex, VOID
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AutodefiningParameters()
           
AutodefiningParameters(Parameter<?>[] base)
           
 
Method Summary
 boolean containsParameter(Parameter<?> param)
          Checks wether a certain parameter is available, using the Parameter as a qualifier.
protected  int define(Parameter param)
           
protected  int define(String param)
           
 int indexOfParameter(Parameter parameter)
          Returns the position of a parameter in the parameters list, using the Parameter as a qualifier.
 int indexOfParameter(String parameterName)
          Returns the position of a parameter in the parameters list, using the parameter name as a qualifier.
static void main(String[] args)
           
 
Methods inherited from class org.mmbase.util.functions.Parameters
check, checkDef, checkRequiredParameters, containsParameter, get, get, get, getDefinition, getString, getString, isAutoCasting, isHavingPatterns, set, set, set, setAll, setAll, setAll, setAll, setAllIfDefined, setAutoCasting, setIfDefined, setIfDefined, size, subList, toClassArray, toEntryList, toMap, toString, toUndefaultEntryList, toUndefaultMap, undefaultBacking, validate
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

AutodefiningParameters

public AutodefiningParameters(Parameter<?>[] base)

AutodefiningParameters

public AutodefiningParameters()
Method Detail

containsParameter

public boolean containsParameter(Parameter<?> param)
Description copied from class: Parameters
Checks wether a certain parameter is available, using the Parameter as a qualifier.

Overrides:
containsParameter in class Parameters
Parameters:
param - the parameter
Returns:
true if a parameter exists.

define

protected int define(Parameter param)

define

protected int define(String param)

indexOfParameter

public int indexOfParameter(Parameter parameter)
Description copied from class: Parameters
Returns the position of a parameter in the parameters list, using the Parameter as a qualifier. you can then acecss that paramter with Parameters.get(int).

Overrides:
indexOfParameter in class Parameters
Parameters:
parameter - the parameter
Returns:
the index of the parameter, or -1 if it doesn't exist

indexOfParameter

public int indexOfParameter(String parameterName)
Description copied from class: Parameters
Returns the position of a parameter in the parameters list, using the parameter name as a qualifier. you can then acecss that paramter with Parameters.get(int).

Overrides:
indexOfParameter in class Parameters
Parameters:
parameterName - the name of the parameter
Returns:
the index of the parameter, or -1 if it doesn't exist

main

public static void main(String[] args)


MMBase 2.0-SNAPSHOT - null