com.tomgibara.pronto.state
Enum PathType

java.lang.Object
  extended by java.lang.Enum<PathType>
      extended by com.tomgibara.pronto.state.PathType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PathType>

public enum PathType
extends java.lang.Enum<PathType>

A path type is used to constrain the selection of paths from a state graph. Each type constrains the transitions of a path in a different way.

Author:
Tom Gibara

Enum Constant Summary
strictlyUniqueStates
          Any path created with this type is guaranteed to visit any given state at most once.
uniqueStates
          Any path created with this type is guaranteed to visit any given state at most once with the exception of the initial state which may be (but is not necessarily) visited twice.
uniqueTransitions
          Any path created with this type is guaranteed to contain any given transition at most once.
 
Method Summary
static PathType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PathType[] 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

uniqueTransitions

public static final PathType uniqueTransitions
Any path created with this type is guaranteed to contain any given transition at most once.


uniqueStates

public static final PathType uniqueStates
Any path created with this type is guaranteed to visit any given state at most once with the exception of the initial state which may be (but is not necessarily) visited twice. This is useful in situations where one needs to identify paths which originate and terminate at the same state.


strictlyUniqueStates

public static final PathType strictlyUniqueStates
Any path created with this type is guaranteed to visit any given state at most once.

Method Detail

values

public static final PathType[] 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(PathType c : PathType.values())
        System.out.println(c);

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

valueOf

public static PathType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name


Copyright © 2006-2007 Tom Gibara. All Rights Reserved.