jmri
Class DccLocoAddress
java.lang.Object
jmri.DccLocoAddress
- All Implemented Interfaces:
- LocoAddress
- Direct Known Subclasses:
- OpenLcbLocoAddress
public class DccLocoAddress
- extends Object
- implements LocoAddress
Encapsulate information for a DCC Locomotive Decoder Address.
In particular, this handles the "short" (standard) vs
"extended" (long) address selection.
An address must be one of these, hence short vs long is encoded
as a boolean.
Once created, the number and long/short status cannot be changed.
number
protected long number
protocol
protected LocoAddress.Protocol protocol
DccLocoAddress
public DccLocoAddress(int number,
boolean isLong)
DccLocoAddress
public DccLocoAddress(int number,
LocoAddress.Protocol protocol)
DccLocoAddress
public DccLocoAddress(DccLocoAddress l)
equals
public boolean equals(Object a)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
isLongAddress
public boolean isLongAddress()
getProtocol
public LocoAddress.Protocol getProtocol()
- Specified by:
getProtocol in interface LocoAddress
getNumber
public int getNumber()
- Specified by:
getNumber in interface LocoAddress
Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: