rac
Class PQComparatorRACFactory<T extends java.lang.Comparable<T>>

java.lang.Object
  extended by rac.ALRSRACFactory<T>
      extended by rac.PQComparatorRACFactory<T>
All Implemented Interfaces:
IRACFactory<T>

public class PQComparatorRACFactory<T extends java.lang.Comparable<T>>
extends ALRSRACFactory<T>


Nested Class Summary
 
Nested classes/interfaces inherited from class rac.ALRSRACFactory
ALRSRACFactory.LRSRAContainer<T>
 
Field Summary
private  java.util.Comparator<T> _comp
           
 
Constructor Summary
PQComparatorRACFactory()
          Used when the items in the container are Comparable objects.
PQComparatorRACFactory(java.util.Comparator<T> comp)
          Used when we want to prioritize the items according to a given Comparator.
 
Method Summary
 IRAContainer<T> makeRAC()
          Create a container that returns the item with the highest priority according to a given Comparator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_comp

private java.util.Comparator<T extends java.lang.Comparable<T>> _comp
Constructor Detail

PQComparatorRACFactory

public PQComparatorRACFactory()
Used when the items in the container are Comparable objects.


PQComparatorRACFactory

public PQComparatorRACFactory(java.util.Comparator<T> comp)
Used when we want to prioritize the items according to a given Comparator.

Parameters:
comp - the item that is smallest according to comp has the highest priority.
Method Detail

makeRAC

public IRAContainer<T> makeRAC()
Create a container that returns the item with the highest priority according to a given Comparator.