jmri
Class BeanSetting

java.lang.Object
  extended by jmri.BeanSetting

public class BeanSetting
extends Object

Represent a Named Bean (e.g. Turnout) and specific setting for it. These can be used e.g. to represent part of a particular path through a layout, or a condition that has to be true as part of something.

Objects of this class are immutable, in that once created the selected bean and required setting cannot be changed. However, the value of the check method does change, because it's a function of the current bean setting(s).

Author:
Bob Jacobsen Copyright (C) 2006, 2008

Constructor Summary
BeanSetting(NamedBean t, int setting)
           
 
Method Summary
 boolean check()
          Convenience method; check if the Bean currently has the desired setting
 NamedBean getBean()
           
 int getSetting()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanSetting

public BeanSetting(NamedBean t,
                   int setting)
Method Detail

check

public boolean check()
Convenience method; check if the Bean currently has the desired setting


getBean

public NamedBean getBean()

getSetting

public int getSetting()


Copyright © 1997 - 2009 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