Package gnu.mapping

Class ConstrainedLocation<T>

java.lang.Object
gnu.mapping.Location<T>
gnu.mapping.ConstrainedLocation<T>
Direct Known Subclasses:
ReadOnlyLocation

public class ConstrainedLocation<T> extends Location<T>
  • Field Details

  • Constructor Details

    • ConstrainedLocation

      public ConstrainedLocation()
  • Method Details

    • make

      public static <T> ConstrainedLocation<T> make(Location<T> base, Procedure converter)
    • getKeySymbol

      public Symbol getKeySymbol()
      Overrides:
      getKeySymbol in class Location<T>
    • getKeyProperty

      public Object getKeyProperty()
      Overrides:
      getKeyProperty in class Location<T>
    • isConstant

      public boolean isConstant()
      Overrides:
      isConstant in class Location<T>
    • get

      public final T get()
      Description copied from class: Location
      Get the current value of this location.
      Specified by:
      get in class Location<T>
    • get

      public final T get(T defaultValue)
      Overrides:
      get in class Location<T>
    • isBound

      public boolean isBound()
      Specified by:
      isBound in class Location<T>
    • coerce

      protected T coerce(T newValue)
    • set

      public final void set(T newValue)
      Specified by:
      set in class Location<T>
    • undefine

      public void undefine()
      Overrides:
      undefine in class Location<T>
    • setWithSave

      public Object setWithSave(T newValue)
      Description copied from class: Location
      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.
      Overrides:
      setWithSave in class Location<T>
    • setRestore

      public void setRestore(Object oldValue)
      Description copied from class: Location
      Restore an old value.
      Overrides:
      setRestore in class Location<T>
      Parameters:
      oldValue - the return value from a prior setWithSave.