jmri
Interface Memory

All Superinterfaces:
NamedBean
All Known Implementing Classes:
AbstractMemory, DefaultMemory

public interface Memory
extends NamedBean

Represent a Memory, a place to store values.

The AbstractMemory class contains a basic implementation of the state and messaging code, and forms a useful start for a system-specific implementation. Specific implementations in the jmrix package, e.g. for LocoNet and NCE, will convert to and from the layout commands.

The states and names are Java Bean parameters, so that listeners can be registered to be notified of any changes.

Each Memory object has a two names. The "user" name is entirely free form, and can be used for any purpose. The "system" name is provided by the system-specific implementations, and provides a unique mapping to the layout control system (e.g. LocoNet, NCE, etc) and address within that system.


This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Author:
Bob Jacobsen Copyright (C) 2001
See Also:
AbstractMemory, MemoryManager, InstanceManager

Field Summary
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Method Summary
 Object getValue()
          Get the stored value.
 void setValue(Object value)
          Set the value.
 
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, dispose, getComment, getNumPropertyChangeListeners, getState, getSystemName, getUserName, removePropertyChangeListener, setComment, setState, setUserName
 

Method Detail

getValue

Object getValue()
Get the stored value. The type of this depends on what was stored...


setValue

void setValue(Object value)
Set the value. Any type of Object can be stored, but various utilities use the toString method of the stored Object.



Copyright © 1997 - 2008 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: SourceForge_Logo