home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML in Action / Dynamicke-HTML-v-akci-covermount.bin / XML / PARSER / XMLINST.EXE / classes / com / ms / xml / util / Attribute.java < prev    next >
Encoding:
Java Source  |  1997-11-03  |  910 b   |  61 lines

  1. /*
  2.  * @(#)Attribute.java 1.0 6/3/97
  3.  * 
  4.  * Copyright (c) 1997 Microsoft, Corp. All Rights Reserved.
  5.  * 
  6.  */
  7. package com.ms.xml.util;
  8.  
  9. /**
  10.  * This class encapsulates an attribute name and value pair.
  11.  *
  12.  * @version 1.0, 6/3/97
  13.  */
  14. public class Attribute
  15. {
  16.     Name    name;
  17.     Object  value;
  18.  
  19.     /**
  20.      * Construct empty attribute.
  21.      */
  22.     public Attribute()
  23.     {
  24.     }
  25.  
  26.     /**
  27.      * Construct attribute with given name and value.
  28.      */
  29.     public Attribute(Name n, Object v)
  30.     {
  31.         name = n;
  32.         value = v;
  33.     }
  34.  
  35.     /**
  36.      * Return the name.
  37.      */
  38.     public Name getName()
  39.     {
  40.         return name;
  41.     }
  42.  
  43.     /**
  44.      * Return the value.
  45.      */
  46.     public Object getValue()
  47.     {
  48.         return value;
  49.     }
  50.  
  51.     /**
  52.      * Used by Attributes, private to this package
  53.      */
  54.     void setValue(Object o)
  55.     {
  56.         value = o;
  57.     }
  58. }    
  59.  
  60.  
  61.