jmri.jmrit.operations.locations
Class Pool
java.lang.Object
jmri.jmrit.operations.locations.Pool
public class Pool
- extends Object
Represents a pool of tracks that share their length.
- Author:
- Daniel Boudreau Copyright (C) 2011
_id
protected String _id
_name
protected String _name
_pool
protected List<Track> _pool
LISTCHANGE_CHANGED_PROPERTY
public static final String LISTCHANGE_CHANGED_PROPERTY
- See Also:
- Constant Field Values
DISPOSE
public static final String DISPOSE
- See Also:
- Constant Field Values
Pool
public Pool(String id,
String name)
getId
public String getId()
setName
public void setName(String name)
toString
public String toString()
- Overrides:
toString in class Object
getName
public String getName()
getSize
public int getSize()
dispose
public void dispose()
add
public void add(Track track)
- Adds a track to this pool
- Parameters:
track - to be added.
remove
public void remove(Track track)
- Removes a track from this pool
- Parameters:
track - to be removed.
getTracks
public List<Track> getTracks()
requestTrackLength
public boolean requestTrackLength(Track track,
int length)
- Request track length from one of the other tracks in this pool.
- Parameters:
track - the track requesting additional lengthlength - the amount of track length requested
- Returns:
- true if successful
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)
firePropertyChange
protected void firePropertyChange(String p,
Object old,
Object n)
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: