public class PortConstraints
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static short |
POSITION_ANY
The any position.
|
static short |
POSITION_EAST
The right position.
|
static short |
POSITION_NORTH
The bottom position.
|
static short |
POSITION_SOUTH
The top position.
|
static short |
POSITION_WEST
The left position.
|
static short |
SOURCE
The source element.
|
static short |
TARGET
The target element.
|
static short |
UNDEFINED |
Constructor and Description |
---|
PortConstraints() |
Modifier and Type | Method and Description |
---|---|
short |
getPortConstraint(short element)
Return the port constraint on an element.
|
java.util.Map<java.lang.Short,java.lang.Short> |
getPortConstraints()
Return the port constraints.
|
boolean |
isEmpty()
Return true if there are port constraints.
|
void |
reset()
Reset all the port constraints.
|
boolean |
setPortConstraint(short element,
short side)
Set a port constraint.
|
boolean |
setPortConstraint(java.lang.String element,
java.lang.String side)
Set a port constraint on the edge.
|
public static final short UNDEFINED
public static final short SOURCE
public static final short TARGET
public static final short POSITION_ANY
public static final short POSITION_SOUTH
public static final short POSITION_NORTH
public static final short POSITION_WEST
public static final short POSITION_EAST
public void reset()
public boolean isEmpty()
public boolean setPortConstraint(short element, short side)
element
- the elementside
- the side constraintpublic boolean setPortConstraint(java.lang.String element, java.lang.String side)
element
- the elementside
- the side constraintpublic java.util.Map<java.lang.Short,java.lang.Short> getPortConstraints()
public short getPortConstraint(short element)
element
- the elementCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence