Interface IOptions

All Known Implementing Classes:
Options

public interface IOptions
Allows getting and setting options. An attempt to reduce the God-class nature of Client.
Author:
David Ripton
  • Method Details

    • addListener

      void addListener(String optname, IOptions.Listener listener)
      Adds a listener to get callbacks for changes on the specified option. The listener should be called only on true changes, not if an option gets set to the value it has anyway.
    • removeListener

      void removeListener(IOptions.Listener listener)
      Removes the listener from all options it is subscribed to. TODO there is a chance of leakage if classes subscribe to the options but never remove their listeners.
    • getOption

      boolean getOption(String optname)
    • getOption

      boolean getOption(String optname, boolean defaultValue)
    • getStringOption

      String getStringOption(String optname)
    • getIntOption

      int getIntOption(String optname)
    • setOption

      void setOption(String optname, String value)
    • setOption

      void setOption(String optname, boolean value)
    • setOption

      void setOption(String optname, int value)