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, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streampublic 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,这种方法从来没有所谓的不允许其他Attributes要添加对象。
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.