de.cau.cs.kieler.kiml.options
Enum PortConstraints

java.lang.Object
  extended by java.lang.Enum<PortConstraints>
      extended by de.cau.cs.kieler.kiml.options.PortConstraints
All Implemented Interfaces:
Comparable<PortConstraints>

public enum PortConstraints
extends Enum<PortConstraints>

Definition of port constraints.

Rating yellow
(2011-03-14) reviewed by cmot, cds

Enum Constant Summary
FIXED_ORDER
          the side is fixed for each port, and the order of ports is fixed for each side.
FIXED_POS
          the exact position is fixed for each port.
FIXED_RATIO
          the side is fixed for each port, the order or ports is fixed for each side and the position of each port must preserve the ratio defined by the two segments the port divides the side into.
FIXED_SIDE
          the side is fixed for each port.
FREE
          all ports are free.
UNDEFINED
          undefined constraints.
 
Method Summary
 boolean isOrderFixed()
          Returns whether the order of ports is fixed.
 boolean isPosFixed()
          Returns whether the position of the ports is fixed.
 boolean isRatioFixed()
          Returns whether the ratio of port positions is fixed.
 boolean isSideFixed()
          Returns whether the sides of ports are fixed.
static PortConstraints valueOf(int i)
          Returns the enumeration value related to the given ordinal.
static PortConstraints valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PortConstraints[] 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

UNDEFINED

public static final PortConstraints UNDEFINED
undefined constraints.


FREE

public static final PortConstraints FREE
all ports are free.


FIXED_SIDE

public static final PortConstraints FIXED_SIDE
the side is fixed for each port.


FIXED_ORDER

public static final PortConstraints FIXED_ORDER
the side is fixed for each port, and the order of ports is fixed for each side.


FIXED_RATIO

public static final PortConstraints FIXED_RATIO
the side is fixed for each port, the order or ports is fixed for each side and the position of each port must preserve the ratio defined by the two segments the port divides the side into.


FIXED_POS

public static final PortConstraints FIXED_POS
the exact position is fixed for each port.

Method Detail

values

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

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

valueOf

public static PortConstraints 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

valueOf

public static PortConstraints valueOf(int i)
Returns the enumeration value related to the given ordinal.

Parameters:
i - ordinal value
Returns:
the related enumeration value

isPosFixed

public boolean isPosFixed()
Returns whether the position of the ports is fixed. Note that this is not true if port ratios are fixed.

Returns:
true if the position is fixed

isRatioFixed

public boolean isRatioFixed()
Returns whether the ratio of port positions is fixed. Note that this is not true if the port positions are fixed.

Returns:
true if the ratio is fixed

isOrderFixed

public boolean isOrderFixed()
Returns whether the order of ports is fixed.

Returns:
true if the order of ports is fixed

isSideFixed

public boolean isSideFixed()
Returns whether the sides of ports are fixed.

Returns:
true if the port sides are fixed
See Also:
PortSide