EnvironmentKey.java 773 B

123456789101112131415161718192021222324
  1. // Copyright (c) 2004 Per M.A. Bothner.
  2. // This is free software; for terms and warranty disclaimer see ./COPYING.
  3. package gnu.mapping;
  4. /** A pair of a name (a <code>Symbol</code>) and a property (any <code>Object</code>).
  5. * A <code>Symbol</code> is an <code>EnvironmentKey</code> with
  6. * a null property component.
  7. * An <code>Environment</code> is a map from <code>EnvironmentKey</code>s
  8. * to <code>Location</code>s.
  9. */
  10. public interface EnvironmentKey
  11. {
  12. public Symbol getKeySymbol ();
  13. public Object getKeyProperty ();
  14. public boolean matches (EnvironmentKey key);
  15. public boolean matches (Symbol symbol, Object property);
  16. /** Conventional value used as a property key for function bindings. */
  17. public static final Object FUNCTION = Symbol.FUNCTION;
  18. }