JavaScript is disabled on your browser.
Skip navigation links
gnu.mapping

Class Location<T>

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static java.lang.String UNBOUND
      Magic value used to indicate there is no property binding.
    • Constructor Summary

      Constructors
      Constructor and Description
      Location ()
    • Field Detail

      • UNBOUND

        public static final java.lang.String UNBOUND
        Magic value used to indicate there is no property binding.
    • Constructor Detail

      • Location

        public Location()
    • Method Detail

      • getKeySymbol

        public Symbol getKeySymbol()
      • getKeyProperty

        public java.lang.Object getKeyProperty()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • get

        public T get(T defaultValue)
      • get

        public abstract T get()
        Get the current value of this location.
        Throws:
        UnboundLocationException - the location does not have a value.
      • set

        public abstract void set(T value)
      • undefine

        public void undefine()
      • setWithSave

        public java.lang.Object setWithSave(T newValue)
        Set a value, but return cookie so old value can be restored. This is intended for fluid-let where (in the case of multiple threads) a simple save-restore isn't always the right thing.
      • setRestore

        public void setRestore(java.lang.Object oldValue)
        Restore an old value.
        Parameters:
        oldValue - the return value from a prior setWithSave.
      • isBound

        public abstract boolean isBound()
      • isConstant

        public boolean isConstant()
      • getValue

        public final T getValue()
      • setValue

        public final T setValue(T newValue)
      • entered

        public boolean entered()
        True if directly entered in an Environment. (Only if NamedLocation.)
      • print

        public void print(java.io.PrintWriter ps)
      • make

        public static Location make(java.lang.Object init,
         java.lang.String name)
      • define

        public static Location define(Symbol name)
        Implement top-level 'define' for Scheme in interactive mode. I.e. if there is no binding, create it; if the existing binding is non-constant, set its value; if it is constant, create a new binding initialized to the old value (though we actually change the binding to non-constant).
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /