jmri
Class DccLocoAddress

java.lang.Object
  extended by jmri.DccLocoAddress
All Implemented Interfaces:
LocoAddress

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.

Author:
Bob Jacobsen Copyright (C) 2005

Constructor Summary
DccLocoAddress(DccLocoAddress l)
           
DccLocoAddress(int number, boolean isLong)
           
 
Method Summary
 boolean equals(Object a)
           
 int getNumber()
           
 int hashCode()
           
 boolean isLongAddress()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DccLocoAddress

public DccLocoAddress(int number,
                      boolean isLong)

DccLocoAddress

public DccLocoAddress(DccLocoAddress l)
Method Detail

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()

getNumber

public int getNumber()


Copyright © 1997 - 2011 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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads