public class StaticBlock
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
StaticBlock()
Constructs the object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Custom equals function (based on id's)
|
int |
getBeacon()
Gets the beacon value.
|
double |
getElevation()
Gets the elevation.
|
double |
getGrade()
Gets the grade.
|
int |
getId()
Gets the identifier.
|
double |
getLength()
Gets the length.
|
java.lang.String |
getLine()
Gets the line.
|
int |
getNextId()
Gets the id of the next block.
|
int |
getPreviousId()
Gets the id of the previous block.
|
java.lang.String |
getRegion()
Gets the region.
|
double |
getSpeedLimit()
Gets the speed limit.
|
StaticSwitch |
getStaticSwitch()
Gets the static switch connected to this block.
|
java.lang.String |
getStation()
Gets the station.
|
boolean |
hasHeater()
Gets whether or not a heater is installed on this block.
|
boolean |
isBidirectional()
Gets the bidirectional.
|
boolean |
isCrossing()
Gets where this block has crossing infrastructure.
|
boolean |
isUnderground()
Gets the underground.
|
protected boolean |
needsUpdate()
Gets whether the block is out of date.
|
protected int |
setBeacon(int beacon)
Sets the beacon value.
|
protected boolean |
setBidirectional(boolean bidirectional)
Sets whether the block is bidirectional.
|
protected boolean |
setCrossing(boolean crossing)
Sets whether the block is a crossing.
|
protected double |
setElevation(double elevation)
Sets the elevation.
|
protected double |
setGrade(double grade)
Sets the grade.
|
protected boolean |
setHeater(boolean heater)
Sets whether the block is heater.
|
protected int |
setId(int id)
Sets the identifier.
|
protected double |
setLength(double length)
Sets the length.
|
protected java.lang.String |
setLine(java.lang.String line)
Sets the line.
|
protected boolean |
setNeedsUpdate(boolean needsUpdate)
Sets whether the block is out of date.
|
protected int |
setNextId(int nextId)
Sets the id of the next block.
|
protected int |
setPreviousId(int previousId)
Sets the id of the previous block.
|
protected java.lang.String |
setRegion(java.lang.String region)
Sets the region.
|
protected double |
setSpeedLimit(double speed)
Sets the speet limit.
|
protected StaticSwitch |
setStaticSwitch(StaticSwitch staticSwitch)
Sets the static switch.
|
protected java.lang.String |
setStation(java.lang.String station)
Sets the station.
|
protected boolean |
setUnderground(boolean underground)
Sets whether the block is underground.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
protected int setId(int id)
id
- The identifierpublic int getId()
protected java.lang.String setRegion(java.lang.String region)
region
- The regionpublic java.lang.String getRegion()
protected double setGrade(double grade)
grade
- The gradepublic double getGrade()
protected double setElevation(double elevation)
elevation
- The elevationpublic double getElevation()
protected double setLength(double length)
length
- The lengthpublic double getLength()
protected java.lang.String setStation(java.lang.String station)
station
- The stationpublic java.lang.String getStation()
protected StaticSwitch setStaticSwitch(StaticSwitch staticSwitch)
staticSwitch
- The static switchpublic StaticSwitch getStaticSwitch()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- comparison objectprotected int setNextId(int nextId)
nextId
- The next identifierpublic int getNextId()
public java.lang.String toString()
toString
in class java.lang.Object
protected boolean setBidirectional(boolean bidirectional)
bidirectional
- if block is bidirectionalpublic boolean isBidirectional()
protected int setPreviousId(int previousId)
previousId
- The previous identifierpublic int getPreviousId()
protected double setSpeedLimit(double speed)
speed
- The speed limitpublic double getSpeedLimit()
protected boolean setUnderground(boolean underground)
underground
- if block is undergroundpublic boolean isUnderground()
protected boolean setHeater(boolean heater)
heater
- if block is heaterpublic boolean hasHeater()
protected boolean setCrossing(boolean crossing)
crossing
- if block is a crossingpublic boolean isCrossing()
protected java.lang.String setLine(java.lang.String line)
line
- The linepublic java.lang.String getLine()
protected boolean setNeedsUpdate(boolean needsUpdate)
needsUpdate
- if block need to be updatedprotected boolean needsUpdate()
protected int setBeacon(int beacon)
beacon
- The beacon valuepublic int getBeacon()