public class StationDataBlock
extends java.lang.Object
implements java.lang.Comparable
Constructor and Description |
---|
StationDataBlock(java.lang.String name,
StatusLevelTag statusLevel,
UsageLevelTag usageLevel,
long timeVal)
Creates a station information block object.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object cmpObj)
Compares this object with the given object for order.
|
java.lang.String |
getDisplayString()
Returns a display string for the station information block.
|
java.lang.String |
getName()
Returns the station name.
|
StatusLevelTag |
getStatusLevel()
Returns the status level tag object for the station.
|
long |
getStatusTimeValue()
Returns the time-of-last-change value for the status level of the
station.
|
UsageLevelTag |
getUsageLevel()
Returns the usage level tag object for the station.
|
long |
getUsageTimeValue()
Returns the time-of-last-change value for the usage level of the
station.
|
java.lang.String |
toString()
Returns the station name.
|
boolean |
updateStatusUsage(StatusLevelTag sLevel,
UsageLevelTag uLevel,
long timeVal)
Updates the status and usage levels for the station.
|
public StationDataBlock(java.lang.String name, StatusLevelTag statusLevel, UsageLevelTag usageLevel, long timeVal)
name
- station name.statusLevel
- status level for station.usageLevel
- usage level for station.timeVal
- the initial time-of-last-change value for this
station block.public java.lang.String getName()
public StatusLevelTag getStatusLevel()
public UsageLevelTag getUsageLevel()
public boolean updateStatusUsage(StatusLevelTag sLevel, UsageLevelTag uLevel, long timeVal)
statusLevel
- status level for station.usageLevel
- usage level for station.timeVal
- time value for this update.public long getStatusTimeValue()
public long getUsageTimeValue()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDisplayString()
public int compareTo(java.lang.Object cmpObj)
compareTo
in interface java.lang.Comparable
cmpObj
- a 'StationDataBlock' object to compare to.'ClassCastException'
- if the given object is not of
type 'StationDataBlock'.