public class FloorConnector extends GridNode
| Modifier and Type | Class and Description |
|---|---|
static class |
FloorConnector.Type
Enum holding the possible different types of a floor connector.
|
traversableg, h, location, parent| Constructor and Description |
|---|
FloorConnector(int x,
int y,
int z,
boolean traversable)
Constructor taking in individual x, y, and z coordinates as well as
a traversable boolean.
|
FloorConnector(int x,
int y,
int z,
boolean traversable,
FloorConnector.Type type)
Constructor uniquely accepting a floor connector type.
|
FloorConnector(int x,
int y,
int z,
boolean traversable,
java.util.List<FloorConnector> connections)
Constructor uniquely accepting the connections for the floor connector.
|
FloorConnector(int x,
int y,
int z,
boolean traversable,
java.util.List<FloorConnector> connections,
FloorConnector.Type type)
Constructor uniquely accepting both the type and connectiong for
the floor connector.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAllConnections(java.util.Collection<? extends FloorConnector> c)
Adds a collection of FloorConnectors to the current connections list.
|
boolean |
addConnection(FloorConnector connection)
Adds a connection to the current connections list.
|
boolean |
equals(java.lang.Object o)
Uses the super class's equals method to determine equality.
|
java.util.List<FloorConnector> |
getConnections()
Access method to get the connections of the floor connector.
|
int |
getIndex()
Access method to get the index.
|
FloorConnector.Type |
getType()
Access method to get the type.
|
java.lang.String |
getTypeString()
Returns the type of the floor connector as a String.
|
int |
hashCode() |
void |
setIndex(int index)
Sets the index for the floor connector
|
void |
setType(FloorConnector.Type type)
Sets the type for the floor connector
|
java.lang.String |
toString()
Returns a formatted String holding the location of the node.
|
isTraversablecompareTo, getG, getH, getLocation, getParent, setG, setH, setParentpublic FloorConnector(int x,
int y,
int z,
boolean traversable)
x - the x coordinate of the nodey - the y coordinate of the nodez - the z coordinate of the nodetraversable - the value determining whether the node an be traversedpublic FloorConnector(int x,
int y,
int z,
boolean traversable,
FloorConnector.Type type)
x - the x coordinate of the nodey - the y coordinate of the nodez - the z coordinate of the nodetraversable - the value determining whether the node an be traversedtype - the type of the floor connectorpublic FloorConnector(int x,
int y,
int z,
boolean traversable,
java.util.List<FloorConnector> connections)
x - the x coordinate of the nodey - the y coordinate of the nodez - the z coordinate of the nodetraversable - the value determining whether the node an be traversedconnections - the connections that are connected to this nodepublic FloorConnector(int x,
int y,
int z,
boolean traversable,
java.util.List<FloorConnector> connections,
FloorConnector.Type type)
x - the x coordinate of the nodey - the y coordinate of the nodez - the z coordinate of the nodetraversable - the value determining whether the node an be traversedconnections - the connections that are connected to this nodetype - the type of the floor connectorpublic int getIndex()
public void setIndex(int index)
index - value to set the index memberpublic FloorConnector.Type getType()
public void setType(FloorConnector.Type type)
type - value to set the type memberpublic java.lang.String getTypeString()
public java.util.List<FloorConnector> getConnections()
public boolean addConnection(FloorConnector connection)
connection - FloorConnector to be added to the current connectionspublic boolean addAllConnections(java.util.Collection<? extends FloorConnector> c)
c - the collection of FloorConnectors to be addedpublic boolean equals(java.lang.Object o)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
AbstractPathfinderNode