IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.framework
Class AbstractPatternInstance.PatternParameterValueQueue

java.lang.Object
  extended bycom.ibm.xtools.patterns.framework.AbstractPatternInstance.PatternParameterValueQueue
Enclosing class:
AbstractPatternInstance

protected static class AbstractPatternInstance.PatternParameterValueQueue
extends Object

A simple queue implementation that is strongly-typed for pattern parameter values.


Constructor Summary
protected AbstractPatternInstance.PatternParameterValueQueue()
           
 
Method Summary
 PatternParameterValue dequeue()
          Performs a dequeue on the queue returning back the value from the top of the queue.
 boolean enqueue(PatternParameterValue.Added added)
          Performs an enqueue on the queue, putting the input value to the end or bottom of the queue.
 boolean enqueue(PatternParameterValue.Removed removed)
          Performs an enqueue on the queue, putting the input value to the end or bottom of the queue.
 void enumerate(AbstractPatternParameter parameter, com.ibm.xtools.patterns.framework.PatternParameterValue.Consumer consumer)
          Enumerates the pattern parameter values on the queue filtered by parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPatternInstance.PatternParameterValueQueue

protected AbstractPatternInstance.PatternParameterValueQueue()
Method Detail

dequeue

public PatternParameterValue dequeue()
Performs a dequeue on the queue returning back the value from the top of the queue. This operation is being traced and therefore this method also sends some data to the trace indicating a dequeue has occurred.

Returns:
the pattern parameter value taken from the queue

enqueue

public boolean enqueue(PatternParameterValue.Added added)
Performs an enqueue on the queue, putting the input value to the end or bottom of the queue.

Parameters:
added - the pattern parameter value to put on the queue
Returns:
returns true if the enqueue was successful

enqueue

public boolean enqueue(PatternParameterValue.Removed removed)
Performs an enqueue on the queue, putting the input value to the end or bottom of the queue.

Parameters:
removed - the pattern parameter value to put on the queue
Returns:
returns true if the enqueue was successful

enumerate

public void enumerate(AbstractPatternParameter parameter,
                      com.ibm.xtools.patterns.framework.PatternParameterValue.Consumer consumer)
Enumerates the pattern parameter values on the queue filtered by parameter. The consumer given is a callback that will be invoked with each pattern parameter value that matches the filter. The call is further directed into the pattern parameter value accept method.

Parameters:
parameter - the parameter of interest
consumer - the consumer callback that is called for every value on the queue found that matches the parameter of interest

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.