Package jmri.beans

Interface BeanInterface

All Known Subinterfaces:
RosterObject
All Known Implementing Classes:
AbstractAudioFrame, AbstractMonFrame, AbstractPacketGenFrame, AbstractPreferencesManager, AbstractRouteAddEditFrame, AbstractServerPreferences, AcelaMonFrame, AcelaPacketGenFrame, AcelaSystemConnectionMemo, AddEntryExitPairFrame, AddNodeFrame, AddSignalMastJFrame, AlignTableFrame, AlternateTrackFrame, AnalogClockFrame, AnymaDMX_SystemConnectionMemo, AppsLaunchFrame, ArbitraryBean, ArbitraryPropertySupport, AudioBufferFrame, AudioListenerFrame, AudioSourceFrame, AudioTableFrame, AutomationCopyFrame, AutomationsTableFrame, AutomationTableFrame, AutomatTableFrame, AutoTrainsFrame, Bean, BeanSetting, BeanTableFrame, BlockBossFrame, BlockPathEditFrame, BugReport, BuildReportOptionFrame, CanSystemConnectionMemo, CarAttributeEditFrame, CarEditFrame, CarLoadEditFrame, CarSetFrame, CarsSetFrame, CarsTableFrame, CbusEventHighlightFrame, CbusFilterFrame, CbusNodeEditEventFrame, CbusNodeRestoreFcuFrame, CbusPreferences, ChangeDepartureTimesFrame, ChangeTrackFrame, ChangeTracksFrame, CircuitBuilder.CBFrame, CMRInetManagerFrame, CMRInetMetricsFrame, CMRISystemConnectionMemo, ConcentratorSystemConnectionMemo, ConditionalCopyFrame, ConditionalEditFrame, ConditionalFrame, ConfigBaseStationFrame, ConflictingSystemConnectionMemo, ConnectionConfigManager, ConsistPreferencesManager, ConsistToolFrame, ConstrainedArbitraryBean, ConstrainedBean, ControllerFilterFrame, ControlPanelEditor, CoordinateEdit, DataSource, Dcc4PcSystemConnectionMemo, DCCppSystemConnectionMemo, DebuggerFrame, DecoderPro3Window, DefaultShutDownManager, DefaultSystemConnectionMemo, DiagnosticFrame, DirectSystemConnectionMemo, DispatcherFrame, DisplayFrame, DrawCircle, DrawEllipse, DrawFrame, DrawPolygon, DrawRectangle, DrawRoundRect, DualDecoderSelectFrame, EasyDccMonFrame, EasyDccPacketGenFrame, EasyDccSystemConnectionMemo, EcosLocoAddress, EcosSystemConnectionMemo, EditCircuitFrame, EditCircuitPaths, EditFrame, EditManifestHeaderTextFrame, EditManifestTextFrame, EditNodeFrame, Editor, Editor.JFrameItem, EditorFrame, EditorManager, EditPortalDirection, EditPortalFrame, EditSignalFrame, EditSwitchListTextFrame, EliteXNetSystemConnectionMemo, EngineAttributeEditFrame, EngineEditFrame, EngineSetFrame, EnginesTableFrame, EnhancementRequest, FileLocationsPreferences, FileUtilSupport, FollowerFrame, GrapevineSystemConnectionMemo, GuiLafPreferencesManager, GuiLafPreferencesManager, HexFileFrame, HexFileSystemConnectionMemo, IconDialog, IEEE802154SystemConnectionMemo, IgnoreUsedTrackFrame, ImageIndexEditor, IndicatorTOIconDialog, InterchangeEditFrame, InternalSystemConnectionMemo, IpocsSystemConnectionMemo, IssueReport, ItemDialog, ItemPalette, JMRIClientSystemConnectionMemo, JmriJFrame, JmriJTablePersistenceManager, JmriServerFrame, JmriSRCPServerFrame, JmriSRCPServerPreferences, JmriUserPreferencesManager, JsonConsistManager, JsonServerPreferences, JsonServerPreferences, LayoutEditor, LayoutTrackExpectedState, LcdClockFrame, LearnThrottleFrame, LI101Frame, ListedTableFrame, ListFrame, ListFrame, LIUSBConfigFrame, LnTcpPreferences, LnTcpServerFrame, LoaderFrame, LocationCopyFrame, LocationEditFrame, LocationsByCarLoadFrame, LocationsByCarTypeFrame, LocationsTableFrame, LocationTrackBlockingOrderFrame, LocoNetSystemConnectionMemo, LogFrame, LogFrame, LV102Frame, LZ100Frame, LZV100Frame, ManageLocationsFrame, ManagerDefaultSelector, MapleSystemConnectionMemo, MarklinSystemConnectionMemo, MastBuilderPane, MdiMainFrame, MemoryIconCoordinateEdit, MeterFrame, MonitorFrame, MqttSystemConnectionMemo, MrcSystemConnectionMemo, MultiPaneWindow, MultiSensorIconDialog, MultiSensorIconFrame, Mx1SystemConnectionMemo, NamedBeanExpectedState, NamedBeanExpectedValue, NceSystemConnectionMemo, NixieClockFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigFrame, NodeConfigManagerFrame, NodeIOListFrame, NodeTableFrame, NXFrame, OakTreeSystemConnectionMemo, OBlockTableFrame, OlcbSystemConnectionMemo, OperationsFrame, OperationsSetupFrame, OptionFrame, OsIndicatorFrame, PacketGenFrame, PacketGenFrame, PacketGenFrame, PacketGenFrame, PacketGenFrame, PacketGenFrame, PacketGenFrame, PacketGenFrame, PacketTableFrame, PanelEditor, PanelProFrame, PaneOpsProgFrame, PaneProgFrame, PaneServiceProgFrame, PickFrame, PollTableFrame, Pool, PoolTrackFrame, PortalEditFrame, PowerPanelFrame, PR2SystemConnectionMemo, PR3SystemConnectionMemo, PR4SystemConnectionMemo, PragotronClockFrame, PreferencesBean, PreferencesFrame, PrintCarRosterAction.CarPrintOptionFrame, PrintEngineRosterAction.EnginePrintOptionFrame, PrintLocationsAction.LocationPrintOptionFrame, PrintMoreOptionFrame, PrintOptionFrame, ProfileManager, ProgrammerConfigManager, ProtocolOptionsFrame, QsiMonFrame, QsiSystemConnectionMemo, RaspberryPiSystemConnectionMemo, RenumberFrame, ReportFrame, RfidSystemConnectionMemo, RollingStockAttributeEditFrame, RollingStockEditFrame, RollingStockSetFrame, RosterConfigManager, RosterEntry, RosterFrame, RosterGroup, RosterGroupTableFrame, RouteAddFrame, RouteCopyFrame, RouteEditFrame, RouteEditFrame, RoutesTableFrame, RpsMonFrame, RpsSystemConnectionMemo, RpsTrackingFrame, Scale, ScheduleCopyFrame, ScheduleEditFrame, ScheduleOptionsFrame, SchedulesByLoadFrame, SchedulesTableFrame, SecsiSystemConnectionMemo, SendPacketFrame, SensorGroupFrame, SensorTextEdit, SerialFilterFrame, SerialMonFrame, SerialMonFrame, SerialMonFrame, SerialMonFrame, SerialMonFrame, SerialMonFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialPacketGenFrame, SerialSystemConnectionMemo, SerialSystemConnectionMemo, ServerFrame, SetPhysicalLocationFrame, SetTrainIconPositionFrame, SetTrainIconRouteFrame, SetupExcelProgramFrame, SetupExcelProgramManifestFrame, SetupExcelProgramSwitchListFrame, ShowCarsInTrainFrame, ShowTrainsServingLocationFrame, SignalEditFrame, SignalHeadIconDialog, SignallingFrame, SignallingSourceFrame, SignalMastRepeaterJFrame, SignalSpeedMap, SimpleClockFrame, SimpleLightCtrlFrame, SimpleProgFrame, SimpleServerFrame, SimpleServerPreferences, SimpleTurnoutCtrlFrame, SlipTurnoutTextEdit, SoundSetFrame, SpecificSystemConnectionMemo, SpecificSystemConnectionMemo, SpecificSystemConnectionMemo, SpecificSystemConnectionMemo, SpeedoConsoleFrame, SpeedometerFrame, SpeedoSystemConnectionMemo, SpeedProfileFrame, SpeedProfileTable, SprogCbusModeSwitcherFrame, SprogCbusSimpleModeSwitcherFrame, SprogCbusSprog3PlusModeSwitcherFrame, SprogConsoleFrame, SprogHexFile, SprogIIUpdateFrame, SprogMonFrame, SprogPacketGenFrame, SprogSlotMonFrame, SprogSystemConnectionMemo, SprogUpdateFrame, SprogVersionFrame, SpurEditFrame, SRCPBusConnectionMemo, SRCPSystemConnectionMemo, StackMonFrame, StagingEditFrame, StandaloneSystemConnectionMemo, StartupActionModelUtil, StartupActionsManager, StartupActionsManager, StatusFrame, SwitchboardEditor, SystemConnectionMemoManager, SystemConsolePreferencesManager, SystemInfoFrame, TabbedPreferencesFrame, TamsSystemConnectionMemo, ThreePaneTLRWindow, ThrottleWindow, TieToolFrame, TimeTableFrame, TmccSystemConnectionMemo, TrackCopyFrame, TrackDestinationEditFrame, TrackEditCommentsFrame, TrackEditFrame, TrackerTableAction.TableFrame, TrackLoadEditFrame, TrackRoadEditFrame, TrainByCarTypeFrame, TrainConductorFrame, TrainCopyFrame, TrainEditBuildOptionsFrame, TrainEditFrame, TrainLoadOptionsFrame, TrainManifestOptionFrame, TrainRoadOptionsFrame, TrainsByCarTypeFrame, TrainScriptFrame, TrainsScheduleEditFrame, TrainsScheduleTableFrame, TrainsScriptFrame, TrainsTableFrame, TrainsTableSetColorFrame, TrainSwitchListEditFrame, TreeFrame, TwoPaneTBWindow, UhlenbrockSystemConnectionMemo, UnboundArbitraryBean, UnboundBean, UsbBrowserFrame, UsbDcs240SystemConnectionMemo, UsbDcs52SystemConnectionMemo, UserInterface, VSDManagerFrame, WarrantFrame, WarrantPreferences, WarrantRoute, WarrantTableFrame, WebAppManager, WebServerPreferences, WhereUsedFrame, XBeeAddNodeFrame, XBeeConnectionMemo, XBeeEditNodeFrame, XBeeNodeConfigFrame, XNetSystemConnectionMemo, XpaConfigureFrame, XpaPacketGenFrame, XpaSystemConnectionMemo, YardEditFrame, YardmasterByTrackFrame, YardmasterFrame, Z21ConfigFrame, Z21SystemConnectionMemo, ZeroConfPreferences

public interface BeanInterface
Simple interface for basic methods that implement JMRI Bean handling methods. Various methods in BeanUtil 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. ArbitraryBean provides generic implementations of these methods that allow the manipulation of properties defined at runtime if your class can extend or extends a subclass of Bean.
See Also:
BeanUtil, Bean
  • Method Details

    • setIndexedProperty

      void setIndexedProperty​(@Nonnull String key, int index, @CheckForNull 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

      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

      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

      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​(@Nonnull 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
    • hasIndexedProperty

      Test that a property exists and is indexed.

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

      Parameters:
      key - name of the property
      Returns:
      true is property key exists and is indexed
    • 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.