public class Node extends java.lang.Object implements FirestoreConstructable<Node>
FirestoreConstructable.InitialisationFailed
Constructor and Description |
---|
Node()
Empty constructor.
|
Node(int nodeIdentifier,
int floorNumber,
java.util.List<Edge> edges) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Logical equality checking for node objects, falls back to superclass for other object types.
|
java.lang.String |
getDescription() |
java.util.List<Edge> |
getEdges() |
int |
getFloorNumber() |
int |
getImage() |
java.lang.String |
getName() |
int |
getNodeIdentifier() |
Node |
initFromFirebase(java.util.Map<java.lang.String,java.lang.Object> firestoreDictionary,
java.lang.String documentIdentifier)
Constructs the object from a Firestore document dictionary.
|
boolean |
isTourNode() |
boolean |
isTourRouteNode() |
public Node(int nodeIdentifier, int floorNumber, java.util.List<Edge> edges)
nodeIdentifier
- Identifier of node in USB.navigationNodes>.
floorNumber
- The floor this node resides on.edges
- A list of edges adjacent to this node.public Node()
public Node initFromFirebase(java.util.Map<java.lang.String,java.lang.Object> firestoreDictionary, java.lang.String documentIdentifier) throws FirestoreConstructable.InitialisationFailed
FirestoreConstructable
initFromFirebase
in interface FirestoreConstructable<Node>
firestoreDictionary
- The Firestore document dictionary.documentIdentifier
- The identifier of the Firestore document, used as the nodeIdentifier.
FirestoreConstructable.InitialisationFailed
FirestoreConstructable.InitialisationFailed
public int getNodeIdentifier()
public int getFloorNumber()
public boolean isTourNode()
public boolean isTourRouteNode()
public java.lang.String getDescription()
@DrawableRes public int getImage()
public java.lang.String getName()
public java.util.List<Edge> getEdges()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object to compare to this
true
if nodes are logically equivalent, or objects have the same hash, otherwise false
.