de.grogra.xl.impl.queues
Class QueueDescriptor<Q extends Queue>

java.lang.Object
  extended by de.grogra.xl.impl.queues.QueueDescriptor<Q>
Direct Known Subclasses:
GraphQueue.AddEdgeDescriptor, GraphQueue.AddNodeDescriptor, GraphQueue.AddUndirectedEdgeDescriptor, GraphQueue.ConnectDescriptor, GraphQueue.DeleteEdgeDescriptor, GraphQueue.DeleteNodeDescriptor, GraphQueue.ExecuteDescriptor, PropertyQueue.MakePersistentDescriptor, PropertyQueue.PropertyQueueDescriptor, VVQueue.Descriptor

public abstract class QueueDescriptor<Q extends Queue>
extends java.lang.Object

A QueueDescriptor is a handle to the method QueueCollection.getQueue(QueueDescriptor), there it is used to instantiate a queue by createQueue(QueueCollection). In addition, a QueueDescriptor describes the order processing of queues (see QueueCollection.process(int[])) by its methods queuesToProcessBefore() and queuesToProcessAfter(). The methods equals and hashCode are overriden such that two descriptors are equal iff their classes are equal.

Author:
Ole Kniemeyer

Field Summary
static QueueDescriptor[] DESCRIPTOR_0
          Immutable QueueDescriptor array of length 0.
 
Constructor Summary
QueueDescriptor()
           
 
Method Summary
static void addOrder(java.util.List<? super QueueDescriptor<?>> queueOrder)
           
abstract  Q createQueue(QueueCollection qc)
          Creates a new Queue.
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
protected abstract  QueueDescriptor[] queuesToProcessAfter()
          Returns the descriptors of queues which are to be applied after the queue of this descriptor.
protected abstract  QueueDescriptor[] queuesToProcessBefore()
          Returns the descriptors of queues which are to be applied before the queue of this descriptor.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTOR_0

public static final QueueDescriptor[] DESCRIPTOR_0
Immutable QueueDescriptor array of length 0.

Constructor Detail

QueueDescriptor

public QueueDescriptor()
Method Detail

addOrder

public static void addOrder(java.util.List<? super QueueDescriptor<?>> queueOrder)

createQueue

public abstract Q createQueue(QueueCollection qc)
Creates a new Queue. This method is invoked by QueueCollection.getQueue(QueueDescriptor).

Parameters:
qc - the invoking QueueCollection
Returns:
a new Queue instance corresponding to this descriptor

equals

public final boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

queuesToProcessAfter

protected abstract QueueDescriptor[] queuesToProcessAfter()
Returns the descriptors of queues which are to be applied after the queue of this descriptor.

Returns:
descriptors of queues to be applied after this descriptor's queue
See Also:
QueueCollection.process(int[])

queuesToProcessBefore

protected abstract QueueDescriptor[] queuesToProcessBefore()
Returns the descriptors of queues which are to be applied before the queue of this descriptor.

Returns:
descriptors of queues to be applied before this descriptor's queue
See Also:
QueueCollection.process(int[])