package jdslx.core.ref;

import jdslx.core.api.InspectableAttribute;

/**
 * Implements read access to a constant attribute.
 *
 * @author Ulrik Brandes 
 * @version 1.0, 07/31/99
**/

public class ConstantAttribute implements InspectableAttribute {

  /**
   * The constant to be returned for every query.
  **/

  protected Object value_;
 

  /**
   * Let the attribute of all elements be <code>value</code>.
   *
  **/

  public ConstantAttribute(Object value) 
  { value_ = value; }


  /**
   * Read access to the attribute.
   *
   * @return the constant value of this attribute
   * 	     that was specified in the constructor
  **/

  public Object get(Object elem) 
  { return value_; }

}
