com.vividsolutions.jts.geomgraph

Class Position


public class Position
extends java.lang.Object

A Position indicates the position of a Location relative to a graph component (Node, Edge, or Area).
Version:
1.6

Field Summary

static int
LEFT
An indicator that a Location is to the left of a GraphComponent
static int
ON
An indicator that a Location is on a GraphComponent
static int
RIGHT
An indicator that a Location is to the right of a GraphComponent

Method Summary

static int
opposite(int position)
Returns LEFT if the position is RIGHT, RIGHT if the position is LEFT, or the position otherwise.

Field Details

LEFT

public static final int LEFT
An indicator that a Location is to the left of a GraphComponent
Field Value:
1

ON

public static final int ON
An indicator that a Location is on a GraphComponent
Field Value:
0

RIGHT

public static final int RIGHT
An indicator that a Location is to the right of a GraphComponent
Field Value:
2

Method Details

opposite

public static final int opposite(int position)
Returns LEFT if the position is RIGHT, RIGHT if the position is LEFT, or the position otherwise.