src/share/classes/javax/print/attribute/HashAttributeSet.java

Print this page




  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.print.attribute;
  27 
  28 import java.io.IOException;
  29 import java.io.ObjectInputStream;
  30 import java.io.ObjectOutputStream;
  31 import java.io.Serializable;
  32 import java.util.HashMap;
  33 
  34 /**
  35  * Class HashAttributeSet provides an <code>AttributeSet</code>
  36  * implementation with characteristics of a hash map.
  37  * <P>
  38  *
  39  * @author  Alan Kaminsky
  40  */
  41 public class HashAttributeSet implements AttributeSet, Serializable {
  42 
  43     private static final long serialVersionUID = 5311560590283707917L;
  44 
  45     /**
  46      * The interface of which all members of this attribute set must be an
  47      * instance. It is assumed to be interface {@link Attribute Attribute}
  48      * or a subinterface thereof.
  49      * @serial
  50      */
  51     private Class myInterface;
  52 
  53     /*
  54      * A HashMap used by the implementation.
  55      * The serialised form doesn't include this instance variable.
  56      */
  57     private transient HashMap attrMap = new HashMap();




  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.print.attribute;
  27 
  28 import java.io.IOException;
  29 import java.io.ObjectInputStream;
  30 import java.io.ObjectOutputStream;
  31 import java.io.Serializable;
  32 import java.util.HashMap;
  33 
  34 /**
  35  * Class HashAttributeSet provides an <code>AttributeSet</code>
  36  * implementation with characteristics of a hash map.

  37  *
  38  * @author  Alan Kaminsky
  39  */
  40 public class HashAttributeSet implements AttributeSet, Serializable {
  41 
  42     private static final long serialVersionUID = 5311560590283707917L;
  43 
  44     /**
  45      * The interface of which all members of this attribute set must be an
  46      * instance. It is assumed to be interface {@link Attribute Attribute}
  47      * or a subinterface thereof.
  48      * @serial
  49      */
  50     private Class myInterface;
  51 
  52     /*
  53      * A HashMap used by the implementation.
  54      * The serialised form doesn't include this instance variable.
  55      */
  56     private transient HashMap attrMap = new HashMap();