jmri.beans
Interface BeanInterface

Show UML class diagram
All Known Implementing Classes:
AbstractAudioFrame, AbstractMonFrame, AbstractPacketGenFrame, AcelaMonFrame, AcelaPacketGenFrame, AddEntryExitPairFrame, AddSensorJFrame, AddSignalMastJFrame, AlignTableFrame, AlmBrowserFrame, AlternateTrackFrame, AnalogClockFrame, AudioBufferFrame, AudioListenerFrame, AudioSourceFrame, AudioTableFrame, AutomatTableFrame, AutoTrainsFrame, Bean, BeanTableFrame, BlockBossFrame, BuildReportOptionFrame, CarAttributeEditFrame, CarEditFrame, CarLoadEditFrame, CarSetFrame, CarsSetFrame, CarsTableFrame, CbusEventFilterFrame, ChangeTrackFrame, ChangeTracksFrame, CircuitBuilder.convertFrame, CommonConductorYardmasterFrame, ConsistToolFrame, ConstrainedBean, ControllerFilterFrame, ControlPanelEditor, CoordinateEdit, DataSource, DebuggerFrame, DecoderPro3Window, DiagnosticFrame, DispatcherFrame, DrawCircle, DrawEllipse, DrawFrame, DrawPolygon, DrawRectangle, DrawRoundRect, DualDecoderSelectFrame, EasyDccMonFrame, EasyDccPacketGenFrame, EditCircuitFrame, EditCircuitPaths, Editor, Editor.JFrameItem, EditorFrame, EditPortalFrame, EngineAttributeEditFrame, EngineEditFrame, EngineSetFrame, EnginesTableFrame, FollowerFrame, HexFileFrame, IgnoreUsedTrackFrame, ImageIndexEditor, InterchangeEditFrame, ItemPalette, JMRIClientMonFrame, JmriJFrame, JmriServerFrame, JmriSRCPServerFrame, JsonServerPreferences, LayoutEditor, LcdClockFrame, LearnThrottleFrame, LI101Frame, ListedTableFrame, ListFrame, ListFrame, LIUSBConfigFrame, LoaderFrame, LocationEditFrame, LocationsByCarTypeFrame, LocationsTableFrame, LocoMonFrame, LogFrame, LV102Frame, LZ100Frame, LZV100Frame, ManageLocationsFrame, MdiMainFrame, MemoryIconCoordinateEdit, MonitorFrame, MrcMonFrame, MultiPaneWindow, MultiSensorIconFrame, Mx1MonFrame, NixieClockFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigFrame, NodeTableFrame, OperationsFrame, OperationsSetupFrame, OptionFrame, OsIndicatorFrame, PacketGenFrame, PacketGenFrame, PacketGenFrame, PacketGenFrame, PacketGenFrame, PacketTableFrame, PanelEditor, PanelProFrame, PaneOpsProgFrame, PaneProgFrame, PaneServiceProgFrame, PickFrame, PollTableFrame, PoolTrackFrame, PowerPanelFrame, PowerPanelFrame, PreferencesFrame, PrintCarRosterAction.CarPrintOptionFrame, PrintLocationsAction.LocationPrintOptionFrame, PrintMoreOptionFrame, PrintOptionFrame, QsiMonFrame, RenumberFrame, ReportFrame, RollingStockSetFrame, RosterFrame, RosterGroupTableFrame, RouteCopyFrame, RouteEditFrame, RoutesTableFrame, RpsMonFrame, RpsTrackingFrame, ScheduleEditFrame, ScheduleOptionsFrame, SchedulesByLoadFrame, SchedulesTableFrame, SendPacketFrame, SensorGroupFrame, SensorTextEdit, SerialMonFrame, SerialMonFrame, SerialMonFrame, SerialMonFrame, SerialMonFrame, SerialMonFrame, SerialMonFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, ServerFrame, SetPhysicalLocationAction.SetPhysicalLocationFrame, SetPhysicalLocationAction.SetPhysicalLocationFrame, SetPhysicalLocationFrame, SetTrainIconPositionFrame, SetTrainIconRouteFrame, SetupExcelProgramFrame, ShowCarsInTrainFrame, SignallingFrame, SignallingSourceFrame, SignalMastRepeaterJFrame, SimpleClockFrame, SimpleLightCtrlFrame, SimpleProgFrame, SimpleServerFrame, SimpleTurnoutCtrlFrame, SlipTurnoutTextEdit, SoundSetFrame, SpeedoConsoleFrame, SpeedometerFrame, SpeedProfileFrame, SprogConsoleFrame, SprogHexFile, SprogIIUpdateFrame, SprogMonFrame, SprogPacketGenFrame, SprogSlotMonFrame, SprogUpdateFrame, Sprogv4UpdateFrame, SprogVersionFrame, SpurEditFrame, SRCPMonFrame, StackMonFrame, StackNXWindow, StagingEditFrame, StatusFrame, SymbolicProgFrame, SystemInfoFrame, TabbedPreferencesFrame, TableFrames, ThreePaneTLRWindow, ThrottleWindow, TieToolFrame, TrackDestinationEditFrame, TrackEditCommentsFrame, TrackEditFrame, TrackerTableAction.TableFrame, TrackLoadEditFrame, TrackRoadEditFrame, TrainByCarTypeFrame, TrainConductorFrame, TrainCopyFrame, TrainEditBuildOptionsFrame, TrainEditFrame, TrainManifestOptionFrame, TrainsByCarTypeFrame, TrainScriptFrame, TrainsScheduleEditFrame, TrainsScheduleTableFrame, TrainsScriptFrame, TrainsTableFrame, TrainSwitchListEditFrame, TreeFrame, TwoPaneTBWindow, UnboundBean, UserInterface, VSDecoderFrame, VSDManagerFrame, WarrantFrame, WarrantRoute, WarrantTableAction.NXFrame, WarrantTableAction.TableFrame, WebServerPreferences, WiThrottlePrefsFrame, XNetMonFrame, XpaConfigureFrame, XpaMonFrame, XpaPacketGenFrame, YardEditFrame, YardmasterFrame, ZimoPacketGenFrame

public interface BeanInterface

Simple interface for basic methods that implement JMRI Bean handling methods. Various methods in Beans test that objects implement this interface before attempting to get or set properties of those objects. Classes implementing this interface can bypass the need to introspect the class to manipulate a property, and can also implement properties that the Beans class will be able to manipulate that do not conform to JavaBeans coding standards. Bean provides generic implementations of these methods if your class can extend or extends a subclass of Bean.

See Also:
Beans, Bean

Method Summary
 Object getIndexedProperty(String key, int index)
          Get the value of an element in an indexed property.
 Object getProperty(String key)
          Get the value of a property.
 Set<String> getPropertyNames()
          List all property names or keys.
 boolean hasProperty(String key)
          Test that a property exists.
 void setIndexedProperty(String key, int index, Object value)
          Set the value of an element in an indexed property.
 void setProperty(String key, Object value)
          Set the value of a property.
 

Method Detail

setIndexedProperty

void setIndexedProperty(String key,
                        int index,
                        Object value)
Set the value of an element in an indexed property.

NOTE Implementing methods must not call Bean.setIndexedProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.setIntrospectedIndexedProperty() instead.

Parameters:
key - name of the property
index - index of the property element to change
value - the value to set the property to

getIndexedProperty

Object getIndexedProperty(String key,
                          int index)
Get the value of an element in an indexed property.

NOTE Implementing methods must not call Bean.getIndexedProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.getIntrospectedIndexedProperty() instead.

Parameters:
key - name of the property
index - index of the property element to change
Returns:
value of the property or null

setProperty

void setProperty(String key,
                 Object value)
Set the value of a property.

NOTE Implementing methods must not call Bean.setProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.setIntrospectedProperty() instead.

Parameters:
key - name of the property
value - the value to set the property to

getProperty

Object getProperty(String key)
Get the value of a property.

NOTE Implementing methods must not call Bean.getProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.getIntrospectedProperty() instead.

Parameters:
key - name of the property
Returns:
The value of the property or null

hasProperty

boolean hasProperty(String key)
Test that a property exists.

NOTE Implementing method must not call Bean.hasProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.hasIntrospectedProperty() instead.

Parameters:
key - name of the property
Returns:
true is property key exists

getPropertyNames

Set<String> getPropertyNames()
List all property names or keys.

NOTE Implementing method must not call Bean.getPropertyNames(), as doing so will cause a stack overflow. Implementing methods may call Beans.getIntrospectedPropertyNames() instead.

NOTE Implementations of this method should not return null.

Returns:
property names or an empty Set.


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