JTools

org.jtools.depend
Enum DependencyOrder

java.lang.Object
  extended by java.lang.Enum<DependencyOrder>
      extended by org.jtools.depend.DependencyOrder
All Implemented Interfaces:
Serializable, Comparable<DependencyOrder>

public enum DependencyOrder
extends Enum<DependencyOrder>

Predefined dependency orders for default target order.

Author:
Rainer Noack

Enum Constant Summary
KEY
          Targets are ordered in the "natural" order of their keys.
ORDER
          Targets are ordered in their declaration sequence.
REVERSE_KEY
          Targets are ordered in the reverse "natural" order of their keys.
REVERSE_ORDER
          Targets are ordered in their declaration sequence.
REVERSE_USEROBJECT
          Targets are ordered in the reverse "natural" order of their userObjects.
USEROBJECT
          Targets are ordered in the "natural" order of their userObjects.
 
Method Summary
 Comparator<DependencyElement> getComparator()
           
static DependencyOrder valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DependencyOrder[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

KEY

public static final DependencyOrder KEY
Targets are ordered in the "natural" order of their keys. KeyType must implement the Comparable Interface.


REVERSE_KEY

public static final DependencyOrder REVERSE_KEY
Targets are ordered in the reverse "natural" order of their keys. KeyType must implement the Comparable Interface.


ORDER

public static final DependencyOrder ORDER
Targets are ordered in their declaration sequence.


REVERSE_ORDER

public static final DependencyOrder REVERSE_ORDER
Targets are ordered in their declaration sequence.


USEROBJECT

public static final DependencyOrder USEROBJECT
Targets are ordered in the "natural" order of their userObjects. Any userObject must implement the Comparable Interface.


REVERSE_USEROBJECT

public static final DependencyOrder REVERSE_USEROBJECT
Targets are ordered in the reverse "natural" order of their userObjects. Any userObject must implement the Comparable Interface.

Method Detail

values

public static final DependencyOrder[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DependencyOrder c : DependencyOrder.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DependencyOrder valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getComparator

public Comparator<DependencyElement> getComparator()

JTools

© 2000-2006, JTools.org.