public class AttributeList extends ArrayList<Object>
代表名单为MBean属性值。看到MBeanServer
和MBeanServerConnection
的getAttributes
和setAttributes
方法。
由于兼容性的原因,它是可能的,虽然很气馁,添加对象到一个AttributeList
不Attribute
实例。然而,一个AttributeList
可以类型安全的,这意味着试图添加一个对象,不是一个Attribute
将产生一个IllegalArgumentException
,AttributeList
成为类型安全的方法时,asList()
叫它。
modCount
Constructor and Description |
---|
AttributeList()
构造一个空
AttributeList 。
|
AttributeList(AttributeList list)
构建了一个
AttributeList 含有的
AttributeList 指定的元素,在它们的
AttributeList 的迭代器返回的顺序。
|
AttributeList(int initialCapacity)
构建了一个具有指定的初始容量的空
AttributeList 。
|
AttributeList(List<Attribute> list)
构建了一个
AttributeList 含有的
List 指定的元素,在它们的
List 的迭代器返回的顺序。
|
Modifier and Type | Method and Description |
---|---|
void |
add(Attribute object)
添加指定的列表的最后一个元素的
Attribute 。
|
void |
add(int index, Attribute object)
在指定的位置上插入指定的元素的属性。
|
void |
add(int index, Object element)
在列表中指定的位置上插入指定的元素。
|
boolean |
add(Object element)
将指定的元素列表的结束。
|
boolean |
addAll(AttributeList list)
在指定附加到列表的末尾的
AttributeList 所有元素,在它们的迭代器指定的
AttributeList 返回顺序。
|
boolean |
addAll(Collection<?> c)
追加指定集合的所有元素到这个列表的末尾,按他们的指定集合的迭代器返回。
|
boolean |
addAll(int index, AttributeList list)
将所有指定到这个列表的
AttributeList 元素,从指定位置开始,在它们的迭代器指定的
AttributeList 返回顺序。
|
boolean |
addAll(int index, Collection<?> c)
将指定集合中的所有元素插入到该列表中,从指定位置开始。
|
List<Attribute> |
asList()
返回此列表的视图作为一个
List<Attribute> 。
|
void |
set(int index, Attribute object)
将指定的位置设置为指定的属性。
|
Object |
set(int index, Object element)
用指定元素替换此列表中指定位置的元素。
|
clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public AttributeList()
AttributeList
。
public AttributeList(int initialCapacity)
AttributeList
。
initialCapacity
的
AttributeList
初始容量,所指定的
ArrayList.ArrayList(int)
。
public AttributeList(AttributeList list)
AttributeList
含有的
AttributeList
指定的元素,在它们的
AttributeList
的迭代器返回的顺序。的
AttributeList
实例有110%的
AttributeList
大小指定的初始容量。
list
-定义新的
AttributeList
初始内容的
AttributeList
。
ArrayList.ArrayList(java.util.Collection)
public AttributeList(List<Attribute> list)
AttributeList
含有的
List
指定的元素,在它们的
List
的迭代器返回的顺序。
list
-定义新的
AttributeList
初始内容的
List
。
IllegalArgumentException
-如果
list
参数
null
或者
list
参数包含任何非属性对象。
ArrayList.ArrayList(java.util.Collection)
public List<Attribute> asList()
List<Attribute>
。要返回的值的变化反映了改变原来的
AttributeList
反之亦然。
List<Attribute>
其内容反映这
AttributeList
内容。
如果这种方法被称为在一个给定的AttributeList
实例,随后尝试添加一个对象实例,并不是一个Attribute
将失败与IllegalArgumentException
。由于兼容性的原因,一个AttributeList
,这种方法从来没有所谓的不允许其他Attribute
s要添加对象。
IllegalArgumentException
-如果这
AttributeList
包含一个元素,不是一个
Attribute
。
public void add(Attribute object)
Attribute
。
object
-属性被添加。
public void add(int index, Attribute object)
object
-要插入的
Attribute
对象。
index
-在列表中的新
Attribute
对象被插入的位置。
public void set(int index, Attribute object)
object
-值的属性单元应设置。
index
-指定位置。
public boolean addAll(AttributeList list)
AttributeList
所有元素,在它们的
AttributeList
指定返回的迭代器的顺序。
list
元素被插入到列表中。
ArrayList.addAll(java.util.Collection)
public boolean addAll(int index, AttributeList list)
AttributeList
元素,从指定位置开始,在它们的迭代器指定的
AttributeList
返回顺序。如果索引超出范围(指数<0 | |指数> size())一runtimeoperationsexception应该提高,包装java.lang.indexoutofboundsexception扔。
list
元素被插入到列表中。
index
位置,从
AttributeList
指定插入的第一个元素。
ArrayList.addAll(int, java.util.Collection)
public boolean add(Object element)
add
接口
Collection<Object>
add
接口
List<Object>
add
方法重写,继承类
ArrayList<Object>
element
元素附加到列表
Collection.add(E)
指定)
IllegalArgumentException
AttributeList
type-safe和
element
不是
Attribute
。
public void add(int index, Object element)
public boolean addAll(Collection<?> c)
addAll
接口
Collection<Object>
addAll
接口
List<Object>
addAll
方法重写,继承类
ArrayList<Object>
c
收集含有的元素被添加到列表
IllegalArgumentException
AttributeList
type-safe和
c
包含一个元素,不是一个
Attribute
。
AbstractCollection.add(Object)
public boolean addAll(int index, Collection<?> c)
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.