home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-20 | 3.2 KB | 95 lines |
- /*
- * @(#)MutableAttributeSet.java 1.3 98/03/18
- *
- * Copyright 1997 Sun Microsystems, Inc. 901 San Antonio Road,
- * Palo Alto, California, 94303, U.S.A. All Rights Reserved.
- *
- * This software is the confidential and proprietary information of Sun
- * Microsystems, Inc. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Sun.
- *
- * CopyrightVersion 1.2
- *
- * (C) Copyright Taligent, Inc. 1997 - All Rights Reserved
- * (C) Copyright IBM Corp. 1997 - All Rights Reserved
- *
- * The original version of this source code is copyright
- * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
- * materials are provided under terms of a License Agreement between Taligent
- * and Sun. This technology is protected by multiple US and International
- * patents. This notice and attribution to Taligent may not be removed.
- * Taligent is a registered trademark of Taligent, Inc.
- *
- *
- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
- * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
- * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
- * THIS SOFTWARE OR ITS DERIVATIVES.
- *
- *
- */
-
- package java.text;
-
- import java.util.Enumeration;
-
- /**
- * A generic interface for a mutable collection of unique attributes.
- * <p>
- * Functions taking AttributeSet as an argument maintain no reference to
- * the attribute set itself. Thus a mutable attribute set may be safely
- * passed to these functions, and later modifications to that set will
- * not affect the contents of this set.
- * <p>
- * Implementations will probably want to provide a constructor of the
- * form:<br><code>
- * public XXXMutableAttributeSet(AttributeSet source);</code><br>
- *
- * @see TextAttributeSet
- */
- public interface MutableAttributeSet extends AttributeSet {
- /**
- * Remove any existing attribute with the specified name, and add a new
- * attribute with the specified name and value.
- *
- * @param name the name of the attribute to add
- * @param value the value of the attribute to add
- */
- public void add(String name, Object value);
-
- /**
- * Remove any existing attributes with the specified names, and add the
- * new attributes.
- *
- * @param attributes the set of attributes to add
- */
- public void add(AttributeSet attributes);
-
- /**
- * Remove any existing attribute with the specified name.
- *
- * @param name the name of the attribute to remove
- */
- public void remove(String name);
-
- /**
- * Remove any existing attributes with the specified names.
- *
- * @param names an enumeration over the names of attributes to remove. The
- * elements of the enumeration are Strings.
- */
- public void remove(Enumeration names);
-
- /**
- * Remove all attributes and add the specified attributes.
- *
- * @param attributes the set of attributes to add
- */
- public void set(AttributeSet attributes);
- }
-
-