Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.jharks.workflow;
  
  import java.util.Iterator;
  
This class represents a basic stackable survey element. This class is a simple wrapper for Objects to be queued and allows for an assignment of a category type to the stackable element. The QueueWrapper class facilitates the ability to handle inner loops on the same queue within the workflow.

Author(s):
Michael J. Rizzo
Version:
1.0
 
 public class QueueWrapper implements StackableWorkFlowConstantsSerializable {
 
 	private static final long serialVersionUID = 1L;

The element type
 
     private String elementType = ;
    
    
Value to which to set a property when iterating
 
     private String propertyValue = null;
    
    
The object to be added to the queue
 
     private Object queueObject;
    
    
Underlying queue of stackable queue element.
 
     protected UnboundedFifoBuffer queue = null;
    
    
Default public constructor.
 
     public QueueWrapper() {
          = new UnboundedFifoBuffer();
     }
    
    
Public constructor that sets element type according to passed string.

Parameters:
elementType the passed category type.
 
     public QueueWrapper(String elementType) {
          = new UnboundedFifoBuffer();
         this. = elementType;
     }
    
    
Public constructor that sets element type according to passed string.

Parameters:
elementType the passed category type.
value the passed value to which to set the transitional property.
 
     public QueueWrapper(String elementTypeString value) {
          = new UnboundedFifoBuffer();
         this. = elementType;
         this. = value;
     }
    
    
 
     public String getElementType() {
         return this.;
     }
    
    
Sets the element type.

Parameters:
elementType the type as a string to which to set the element type.
 
     public void setElementType(String elementType) {
         this. = elementType;
     }
    
    
 
     public String getPropertyValue() {
         return this.;
     }
    
    
Sets the transitional property value.

Parameters:
value the value to which to set the tranisional property.
 
     public void setPropertyValue(String value) {
         this. = value;
     }

    
 
     public void setStackObject(Object item) {
         this. = item;
     }
    
    
    public Object getStackObject() {
        return this.;
    }
    
    public boolean add(Object obj) {
        return .add(obj);
    }
    
    public Object get() {
        return .get();
    }
    
    public Object remove() {
        return .remove();
    }
    
    public int queueSize() {
        return .size();
    }
    
    public boolean isEmpty() {
        return .isEmpty();
    }
    
    @SuppressWarnings("unchecked")
	public Iterator queueIterator() {
        return .iterator();
    }
New to GrepCode? Check out our FAQ X