Modifier and Type | Field and Description |
---|---|
boolean |
accessible
Boolean value whether the edge is accessible.
|
boolean |
cardLocked
Boolean value whether the edge requires card authorization.
|
java.util.List<java.lang.Integer> |
directions
The directions from the edge.
|
java.util.List<java.lang.Double> |
distances
The distances from the edge.
|
double |
weight
The weight of the edge.
|
Constructor and Description |
---|
Edge(Node origin,
int destinationIdentifier,
double weight,
java.util.List<java.lang.Integer> directions,
java.util.List<java.lang.Double> distances,
boolean cardLocked,
boolean accessible)
Construct an edge between nodes.
|
Edge(Node origin,
java.util.Map<java.lang.String,java.lang.Object> firestoreDictionary)
Initialise an edge from Firebase.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Logical equality checking for edges, falls back to superclass for unknown object types.
|
Node |
getDestination() |
Node |
getOrigin() |
java.lang.String |
toString() |
public final double weight
public final java.util.List<java.lang.Integer> directions
public final java.util.List<java.lang.Double> distances
public final boolean cardLocked
public final boolean accessible
public Edge(Node origin, int destinationIdentifier, double weight, java.util.List<java.lang.Integer> directions, java.util.List<java.lang.Double> distances, boolean cardLocked, boolean accessible)
origin
- Origin node of this edge.destinationIdentifier
- Identifier of destination node of this edge.weight
- Total weight of the path this edge represents.directions
- List of direction - Copy is made.distances
- List of distances for each direction - Copy is made.cardLocked
- boolean whether card access is required.accessible
- boolean whether this edge meets accessibility needs.public Edge(Node origin, java.util.Map<java.lang.String,java.lang.Object> firestoreDictionary) throws FirestoreConstructable.InitialisationFailed
origin
- Origin node of this edge.firestoreDictionary
- Map representation of this edge in Firebase.FirestoreConstructable.InitialisationFailed
public Node getOrigin()
public Node getDestination()
nodeIdentifier
of this edge from USB.navigationNodes
.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object to compare to this
.false
.public java.lang.String toString()
toString
in class java.lang.Object