public interface DocAttributeSet extends AttributeSet
DocAttribute
。在打印服务API,客户端使用一个docattributeset指定要应用到单个文件的个人文档和打印作业设置的特点。
一个docattributeset只是一个AttributeSet
其构造函数和变异操作保证额外的不变性,即在docattributeset所有属性的值必须是接口DocAttribute
实例。的add(Attribute)
,和addAll(AttributeSet)
操作指定以下保证这额外的不变。
Modifier and Type | Method and Description |
---|---|
boolean |
add(Attribute attribute)
如果没有已存在,则将指定的属性值添加到该属性集上,首先将在同一属性类别中的任何现有值作为指定的属性值(可选操作)。
|
boolean |
addAll(AttributeSet attributes)
将指定的集合中的所有元素添加到这个属性中。
|
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, remove, remove, size, toArray
boolean add(Attribute attribute)
add
接口
AttributeSet
attribute
属性值被添加到这个属性设置。
UnmodifiableSetException
-(unchecked异常)如果这个属性设置不支持
add()
操作抛出。
ClassCastException
-(unchecked例外)如果
attribute
不是接口
DocAttribute
实例抛出。
NullPointerException
-(unchecked例外)如果
attribute
空抛。
boolean addAll(AttributeSet attributes)
add(Attribute)
操作已经被应用到该属性集的每个元素依次从指定的设置相同。如果在指定的类别是没有这个属性设置任何类别的操作相同,
addAll()有效地修改该属性集,其价值是两套联盟。
如果指定的设置是在操作进行改性的addAll()
操作行为是未定义的。
如果addAll()
操作抛出异常,该属性集的状态的影响是依赖于实现的;元素从指定的集合点前的异常可能会或可能不会被添加到这个属性设置。
addAll
接口
AttributeSet
attributes
的元素被添加到这个属性设置。
UnmodifiableSetException
-(unchecked异常)如果这个属性设置不支持
addAll()方法引发。
ClassCastException
-(unchecked异常)如果在指定的元素不是接口
DocAttribute
实例抛出。
NullPointerException
-(unchecked例外)如果指定的集合是空抛。
add(Attribute)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.