public class Node<T> extends AbstractPoint implements AttributedObject, Externalizable
NULL_ORDINATE, X, Y, ZM, sortedGeometryTypes| Modifier | Constructor and Description |
|---|---|
|
Node() |
protected |
Node(int nodeId,
Graph<T> graph,
Point point) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addInEdge(Edge<T> edge) |
protected void |
addOutEdge(Edge<T> edge) |
PointDouble |
clonePoint() |
int |
compareTo(Node<T> node) |
boolean |
equalsCoordinate(double x,
double y) |
protected void |
finalize() |
Point |
get3dCoordinates(String typePath) |
double |
getCoordinate(int index)
Gets the ordinate value for the given index.
|
static List<Point> |
getCoordinates(Collection<Node<Record>> nodes) |
int |
getDegree() |
double |
getDistance(Geometry geometry)
Get the distance between this node and the geometry.
|
int |
getEdgeCount() |
int |
getEdgeIndex(Edge<T> edge) |
static <V> int |
getEdgeIndex(List<Edge<V>> edges,
Edge<V> edge) |
List<Edge<T>> |
getEdges() |
static <T> Set<Edge<T>> |
getEdgesBetween(Node<T> node0,
Node<T> node1) |
static <T> Collection<Edge<T>> |
getEdgesBetween(String typePath,
Node<T> node0,
Node<T> node1) |
Set<Edge<T>> |
getEdgesTo(Node<T> node) |
List<Edge<T>> |
getEdgesWithoutAttribute(String fieldName)
Get all the edges from a node which do not have an attribute with the
specified name.
|
<V> V |
getField(String name) |
Map<String,Object> |
getFields() |
Graph<T> |
getGraph() |
int |
getId() |
int |
getInEdgeIndex(Edge<T> edge) |
List<Edge<T>> |
getInEdges() |
Edge<T> |
getNextEdge(Edge<T> edge) |
static <V> Edge<V> |
getNextEdge(List<Edge<V>> edges,
Edge<V> edge) |
Edge<T> |
getNextInEdge(Edge<T> edge) |
Edge<T> |
getNextOutEdge(Edge<T> edge) |
int |
getOutEdgeIndex(Edge<T> edge) |
List<Edge<T>> |
getOutEdges() |
List<Edge<T>> |
getOutEdgesTo(Node<T> node) |
Point |
getPoint()
Returns a vertex of this
Geometry
(usually, but not necessarily, the first one). |
boolean |
hasAttribute(String name) |
boolean |
hasEdge(Edge<T> edge) |
boolean |
hasEdges() |
static <T> boolean |
hasEdgesBetween(String typePath,
Node<T> node0,
Node<T> node1) |
boolean |
hasEdgeTo(Node<T> node) |
int |
hashCode()
Gets a hash code for the Geometry.
|
boolean |
isRemoved() |
boolean |
move(Point newCoordinates) |
void |
readExternal(ObjectInput in) |
void |
remove(Edge<T> edge) |
int[] |
removeEdge(int[] oldEdgeIds,
Edge<T> edge) |
void |
setAttribute(String name,
Object value) |
void |
setAttributes(Map<String,Object> attributes) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
angle2d, appendVertex, clone, compareTo, compareToSameClass, computeBoundingBox, copy, copyCoordinates, deleteVertex, distance, distance, distance3d, doEquals, equals, equals, equals, equals2d, equalsExact, getBoundary, getBoundaryDimension, getCoordinates, getDataType, getDimension, getGeometryFactory, getM, getPointWithin, getSegment, getTime, getToVertex, getVertex, getVertexCount, getX, getY, getZ, insertVertex, intersects, isEmpty, isEquivalentClass, isSimple, isValid, move, moveVertex, normalize, prepare, reverse, segments, verticesbuffer, buffer, buffer, checkNotGeometryCollection, compare, contains, containsProperly, convert, convert, convexHull, coveredBy, covers, createVertexId, crosses, difference, disjoint, distance, envelopeCovers, envelopesIntersect, equal, equals, equals, equalsExact, equalsNorm, equalsTopo, geometries, getArea, getAxisCount, getBoundingBox, getCentroid, getClassSortIndex, getCoordinateSystem, getEnvelope, getGeometries, getGeometries, getGeometry, getGeometryComponents, getGeometryCount, getGeometryType, getInteriorPoint, getLength, getNonZeroGeometryFactory, getSrid, getUserData, getVertexIndex, hasInvalidXyCoordinates, hasNonEmptyElements, hasNullElements, intersection, intersects, isAnyTargetComponentInTest, isGeometryCollection, isRectangle, isWithinDistance, overlaps, relate, relate, setUserData, setVertexIndex, symDifference, toClockwise, toCounterClockwise, touches, toWkt, union, union, withinbuffer, buffer, buffer, contains, containsProperly, convert, convert, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, equal, equals, equals, equalsExact, equalsNorm, equalsTopo, geometries, getArea, getAxisCount, getBoundingBox, getCentroid, getClassSortIndex, getCoordinateSystem, getEnvelope, getGeometries, getGeometries, getGeometry, getGeometryComponents, getGeometryCount, getGeometryType, getInteriorPoint, getLength, getSrid, getUserData, hasInvalidXyCoordinates, intersection, intersects, isRectangle, isWithinDistance, overlaps, relate, relate, setUserData, symDifference, toClockwise, toCounterClockwise, touches, toWkt, union, union, withinpublic static List<Point> getCoordinates(Collection<Node<Record>> nodes)
public static <T> Collection<Edge<T>> getEdgesBetween(String typePath, Node<T> node0, Node<T> node1)
public static <T> boolean hasEdgesBetween(String typePath, Node<T> node0, Node<T> node1)
public PointDouble clonePoint()
clonePoint in interface PointclonePoint in class AbstractPointpublic boolean equalsCoordinate(double x,
double y)
protected void finalize()
throws Throwable
public double getCoordinate(int index)
PointPoint.X, Point.Y, and Point.Z.getCoordinate in interface Pointindex - the ordinate indexpublic int getDegree()
public double getDistance(Geometry geometry)
geometry - The geometry.public int getEdgeCount()
public List<Edge<T>> getEdgesWithoutAttribute(String fieldName)
node - The node to get the edges for.fieldName - The attribute name.public <V> V getField(String name)
getField in interface AttributedObjectpublic Map<String,Object> getFields()
getFields in interface AttributedObjectpublic int getId()
public Point getPoint()
AbstractGeometryGeometry
(usually, but not necessarily, the first one).
The returned coordinate should not be assumed
to be an actual Point object used in
the internal representation.getPoint in interface GeometrygetPoint in class AbstractPointCoordinates which is a vertex of this Geometry.public boolean hasAttribute(String name)
public boolean hasEdges()
public int hashCode()
AbstractGeometryhashCode in interface GeometryhashCode in class AbstractPointpublic boolean isRemoved()
public boolean move(Point newCoordinates)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void setAttribute(String name, Object value)
setAttribute in interface AttributedObjectpublic String toString()
toString in class AbstractGeometrypublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2015 Revolution Systems Inc.. All rights reserved.