org.jboss.osgi.metadata.internal
Class AbstractParameter

java.lang.Object
  extended by org.jboss.osgi.metadata.internal.AbstractParameter
All Implemented Interfaces:
Parameter

public class AbstractParameter
extends Object
implements Parameter

Parameter impl. It uses [Hash]Set to hold the values. So duplicate values (by hash) will be ignored.

Author:
Ales Justin

Field Summary
protected  Collection<String> values
           
 
Constructor Summary
AbstractParameter()
           
AbstractParameter(String parameter)
           
 
Method Summary
 void addValue(String value)
          Add value.
 Object getValue()
          Get value.
 boolean isCollection()
          Has multiple values.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

values

protected Collection<String> values
Constructor Detail

AbstractParameter

public AbstractParameter()

AbstractParameter

public AbstractParameter(String parameter)
Method Detail

addValue

public void addValue(String value)
Description copied from interface: Parameter
Add value.

Specified by:
addValue in interface Parameter
Parameters:
value - string to add

getValue

public Object getValue()
Description copied from interface: Parameter
Get value. Simple string value or collection of string values.

Specified by:
getValue in interface Parameter
Returns:
value

isCollection

public boolean isCollection()
Description copied from interface: Parameter
Has multiple values. Used when same name is used for multiple parameter values. Value _can_ be casted into Collection.

Specified by:
isCollection in interface Parameter
Returns:
true is returned type is Collection, otherwise false

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 JBoss by Red Hat. All Rights Reserved.