Java API ReferenceClass Hierarchy | All Classes | All Fields and Methods

com.ibm.xtools.patterns.framework

Class PatternParameterValue

+-- AbstractParameterArgument
      +-- PatternParameterValue

abstract public Class PatternParameterValue
extends AbstractParameterArgument

The pattern parameter value class is a key abstraction in the framework.

Nested Class Summary:


Constructor summary
PatternParameterValue()

The default constructor for PatternParameterValue class that is provided automatically by the compiler.

Method summary
voidaccept(PatternParameterValue.Consumer consumer)

An abstract method that is implemented in the subclasses such as added, removed, maintained or proposed.

AbstractParameterArgumentgetArgument()

Gets the current argument as a singular value, if multiple arguments are stored only the first is returned.

AbstractParameterArgumentgetArguments()

Gets the current arguments as a multivalue.

StringgetImage()

IPatternMetatypegetMetatype()

AbstractPatternInstancegetOwningInstance()

Get the owning instance.

AbstractPatternParametergetOwningParameter()

Get the owning parameter.

ObjectgetValue()

Gets the current value as a singular value, if multiple values are stored only the first is returned.

ObjectgetValues()

Gets the current value as a multivalue.

booleanhasValue()

Determine if this pattern parameter value has a value.

booleanhasValues()

Determine if this pattern parameter value has values or a value.

booleanisValueFor(AbstractPatternParameter parameter)

Determines if the parameter given has the value as specified by this instance.

Constructor detail

PatternParameterValue

public PatternParameterValue()

The default constructor for PatternParameterValue class that is provided automatically by the compiler.


Method detail

accept

abstract public void accept(PatternParameterValue.Consumer consumer)

An abstract method that is implemented in the subclasses such as added, removed, maintained or proposed.

Parameters:

consumer
- the callback interface

getArgument

public AbstractParameterArgument getArgument()

Gets the current argument as a singular value, if multiple arguments are stored only the first is returned.

Returns:

the first element of the arguments array

getArguments

public AbstractParameterArgument getArguments()

Gets the current arguments as a multivalue.

Returns:

returns the arguments as an array

getImage

public String getImage()

Returns:

a String representing the image value

getMetatype

public IPatternMetatype getMetatype()

Returns:

an IPatternMetatype object. representing the metatype value

getOwningInstance

public AbstractPatternInstance getOwningInstance()

Get the owning instance.

Returns:

the owning instance for this pattern parameter value

getOwningParameter

public AbstractPatternParameter getOwningParameter()

Get the owning parameter.

Returns:

the owning parameter for this pattern parameter value

getValue

public Object getValue()

Gets the current value as a singular value, if multiple values are stored only the first is returned.

Returns:

the object value of the first element of the arguments array

getValues

public Object getValues()

Gets the current value as a multivalue.

Returns:

returns the values as an Object array

hasValue

public boolean hasValue()

Determine if this pattern parameter value has a value.

Returns:

indicates whether or not a value exists

hasValues

public boolean hasValues()

Determine if this pattern parameter value has values or a value.

Returns:

indicates whether or not values exist

isValueFor

public boolean isValueFor(AbstractPatternParameter parameter)

Determines if the parameter given has the value as specified by this instance.

Parameters:

parameter
- the parameter to check if this is a value for

Returns:

true if this is a value for the given parameter


Feedback