net.sf.cpsolver.coursett.constraint
Enum FlexibleConstraint.FlexibleConstraintType

java.lang.Object
  extended by java.lang.Enum<FlexibleConstraint.FlexibleConstraintType>
      extended by net.sf.cpsolver.coursett.constraint.FlexibleConstraint.FlexibleConstraintType
All Implemented Interfaces:
Serializable, Comparable<FlexibleConstraint.FlexibleConstraintType>
Enclosing class:
FlexibleConstraint

public static enum FlexibleConstraint.FlexibleConstraintType
extends Enum<FlexibleConstraint.FlexibleConstraintType>

Flexible constraint types


Enum Constant Summary
BREAK
          There must be a break of a given length in a given time interval.
MAX_BREAKS
          Limit number of breaks between adjacent classes on a day.
MAXBLOCK_BACKTOBACK
          Given classes must be taught in a way there is a break between two blocks of classes.
 
Method Summary
 FlexibleConstraint create(Long id, String owner, String preference, String reference)
           
 String getName()
           
 String getPattern()
           
static FlexibleConstraint.FlexibleConstraintType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FlexibleConstraint.FlexibleConstraintType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MAXBLOCK_BACKTOBACK

public static final FlexibleConstraint.FlexibleConstraintType MAXBLOCK_BACKTOBACK
Given classes must be taught in a way there is a break between two blocks of classes.


BREAK

public static final FlexibleConstraint.FlexibleConstraintType BREAK
There must be a break of a given length in a given time interval.


MAX_BREAKS

public static final FlexibleConstraint.FlexibleConstraintType MAX_BREAKS
Limit number of breaks between adjacent classes on a day.

Method Detail

values

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

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

valueOf

public static FlexibleConstraint.FlexibleConstraintType 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
NullPointerException - if the argument is null

getPattern

public String getPattern()

getName

public String getName()

create

public FlexibleConstraint create(Long id,
                                 String owner,
                                 String preference,
                                 String reference)
                          throws IllegalArgumentException
Throws:
IllegalArgumentException


Copyright © 2014 UniTime LLC. All Rights Reserved.