public class Edge<T> extends Object implements AttributedObject, Comparable<Edge<T>>, Externalizable
| Constructor and Description |
|---|
Edge() |
Edge(int id,
Graph<T> graph,
Node<T> fromNode,
Node<T> toNode) |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
addEdgeToEdgesByLine(Map<LineString,Set<Edge<T>>> lineEdgeMap,
Edge<T> edge) |
static <T> void |
addEdgeToEdgesByLine(Node<T> node,
Map<LineString,Set<Edge<T>>> lineEdgeMap,
Edge<T> edge) |
int |
compareTo(Edge<T> edge) |
double |
distance(Edge<LineSegmentMatch> edge) |
double |
distance(Node<T> node) |
double |
distance(Point point) |
protected void |
finalize() |
double |
getAngle(Node<T> node) |
BoundingBox |
getBoundingBox() |
Collection<Node<T>> |
getCommonNodes(Edge<T> edge) |
static <T> Set<Edge<T>> |
getEdges(Collection<Edge<T>> edges,
LineString line) |
static <T> List<Edge<T>> |
getEdges(List<Edge<T>> edges,
Filter<Edge<T>> filter) |
static <T> Set<Edge<T>> |
getEdges(Map<LineString,Set<Edge<T>>> lineEdgeMap,
LineString line) |
static <T> Map<LineString,Set<Edge<T>>> |
getEdgesByLine(List<Edge<T>> edges) |
static <T> Map<LineString,Set<Edge<T>>> |
getEdgesByLine(Node<T> node,
List<Edge<T>> edges) |
static <T> List<Edge<T>> |
getEdgesMatchingObjectFilter(List<Edge<T>> edges,
Filter<T> filter) |
List<Edge<T>> |
getEdgesToNextJunctionNode(Node<T> node) |
BoundingBox |
getEnvelope() |
<V> V |
getField(String name) |
Map<String,Object> |
getFields() |
double |
getFromAngle() |
Node<T> |
getFromNode() |
Graph<T> |
getGraph() |
int |
getId() |
double |
getLength() |
LineString |
getLine() |
Node<T> |
getNextJunctionNode(Node<T> node) |
Collection<Node<T>> |
getNodes() |
T |
getObject() |
static <T> List<T> |
getObjects(Collection<Edge<T>> edges)
Get the list of objects from the collection of edges.
|
Node<T> |
getOppositeNode(Node<T> node) |
double |
getToAngle() |
Node<T> |
getToNode() |
String |
getTypeName() |
static <T> Map<String,List<Edge<T>>> |
getTypeNameEdgesMap(List<Edge<T>> edges)
Get the map of type name to list of edges.
|
static <T> boolean |
hasEdgeMatchingObjectFilter(List<Edge<T>> edges,
Filter<T> filter) |
int |
hashCode() |
boolean |
hasNode(Node<T> node) |
boolean |
isForwards(Node<T> node)
Get the direction of the edge from the specified node.
|
boolean |
isLessThanDistance(Node<T> node,
double distance) |
boolean |
isLessThanDistance(Point point,
double distance) |
boolean |
isRemoved() |
boolean |
isWithinDistance(Node<T> node,
double distance) |
boolean |
isWithinDistance(Point point,
double distance) |
void |
readExternal(ObjectInput in) |
void |
remove() |
static <T> void |
remove(Collection<Edge<T>> edges) |
List<Edge<T>> |
replace(LineString... lines) |
List<Edge<T>> |
replace(List<LineString> lines) |
void |
setAttribute(String name,
Object value) |
void |
setAttributes(Map<String,Object> attributes) |
static <T> void |
setEdgesAttribute(List<Edge<T>> edges,
String fieldName,
Object value) |
<V extends Point> |
split(Collection<V> splitPoints) |
<V extends Point> |
split(Collection<V> points,
double maxDistance) |
List<Edge<T>> |
split(List<Point> points) |
List<Edge<T>> |
split(Point... points) |
String |
toString() |
boolean |
touches(Edge<T> edge) |
void |
writeExternal(ObjectOutput out) |
public static <T> void addEdgeToEdgesByLine(Map<LineString,Set<Edge<T>>> lineEdgeMap, Edge<T> edge)
public static <T> void addEdgeToEdgesByLine(Node<T> node, Map<LineString,Set<Edge<T>>> lineEdgeMap, Edge<T> edge)
public static <T> Set<Edge<T>> getEdges(Collection<Edge<T>> edges, LineString line)
public static <T> Set<Edge<T>> getEdges(Map<LineString,Set<Edge<T>>> lineEdgeMap, LineString line)
public static <T> Map<LineString,Set<Edge<T>>> getEdgesByLine(Node<T> node, List<Edge<T>> edges)
public static <T> List<Edge<T>> getEdgesMatchingObjectFilter(List<Edge<T>> edges, Filter<T> filter)
public static <T> List<T> getObjects(Collection<Edge<T>> edges)
T - The type of the objects.edges - The collection of edges.public static <T> Map<String,List<Edge<T>>> getTypeNameEdgesMap(List<Edge<T>> edges)
T - The type of object stored in the edge.edges - The list of edges.public static <T> boolean hasEdgeMatchingObjectFilter(List<Edge<T>> edges, Filter<T> filter)
public static <T> void remove(Collection<Edge<T>> edges)
public static <T> void setEdgesAttribute(List<Edge<T>> edges, String fieldName, Object value)
public int compareTo(Edge<T> edge)
compareTo in interface Comparable<Edge<T>>public double distance(Edge<LineSegmentMatch> edge)
public double distance(Point point)
protected void finalize()
throws Throwable
public BoundingBox getBoundingBox()
public Collection<Node<T>> getCommonNodes(Edge<T> edge)
public BoundingBox getEnvelope()
public <V> V getField(String name)
getField in interface AttributedObjectpublic Map<String,Object> getFields()
getFields in interface AttributedObjectpublic double getFromAngle()
public int getId()
public double getLength()
public LineString getLine()
public Collection<Node<T>> getNodes()
public T getObject()
public double getToAngle()
public String getTypeName()
public boolean isForwards(Node<T> node)
node - The node to test the direction from.public boolean isLessThanDistance(Point point, double distance)
public boolean isRemoved()
public boolean isWithinDistance(Point point, double distance)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void remove()
public List<Edge<T>> replace(LineString... lines)
public List<Edge<T>> replace(List<LineString> lines)
public void setAttribute(String name, Object value)
setAttribute in interface AttributedObjectpublic <V extends Point> List<Edge<T>> split(Collection<V> splitPoints)
public <V extends Point> List<Edge<T>> split(Collection<V> points, double maxDistance)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2015 Revolution Systems Inc.. All rights reserved.