javax.management
Class AttributeList
- Cloneable, Collection<E>, Iterable<E>, List<E>, RandomAccess, Serializable
Represents a list of MBean
Attribute
s, with their
names and values. This is implemented as an
ArrayList
extension, with additional
methods typed to only allow the addition of
Attribute
s.
T[] toArray , add , add , addAll , addAll , clear , clone , contains , ensureCapacity , get , indexOf , isEmpty , lastIndexOf , remove , removeRange , set , size , toArray , trimToSize |
add , add , addAll , clear , equals , get , hashCode , indexOf , iterator , lastIndexOf , listIterator , listIterator , remove , removeRange , set , subList |
T[] toArray , add , addAll , clear , contains , containsAll , isEmpty , iterator , remove , removeAll , retainAll , size , toArray , toString |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
AttributeList
public AttributeList()
Constructs an empty list with an initial capacity of ten.
AttributeList
public AttributeList(int capacity)
Constructs an empty list with the specified initial capacity.
capacity
- the initial capacity of the list.
AttributeList
public AttributeList(AttributeList list)
Constructs an
AttributeList
using the contents
of an existing list. The initial capacity is 110% of the
size of the specified list.
list
- the list to use to fill this list.
java.util.ArrayList.ArrayList(java.util.Collection)
add
public void add(int index,
Attribute attribute)
Adds the specified
Attribute
at the supplied index.
Any attribute already at that index is moved up one place
in the list to the position
(index + 1)
.
Likewise, the attribute at
(index + 1)
is
also moved up one place, continuing until the final
attribute in the list moves to a new position, increasing
the size of the list.
If the index is invalid (i.e. it is smaller than zero, or
greater than the current size of the list), a
index
- the index at which to place the new attribute.attribute
- the new attribute to add.
java.util.ArrayList.add(int, Object)
add
public void add(Attribute attribute)
Adds the specified
Attribute
to the end of the list.
attribute
- the attribute to add.
java.util.Arraylist.add(Object)
addAll
public boolean addAll(int index,
AttributeList list)
Adds all the
Attribute
s from the supplied list
to this list, at the specified index. The attributes
are added in the order they are returned by the
list's
Iterator
. Any attribute already
at that index is moved up one place in the list to the
position
(index + list.size())
.
Likewise, the attribute at
(index + list.size())
is also moved up one place, continuing until the final
attribute in the original list.
If the index is invalid (i.e. it is smaller than zero, or
greater than the current size of the list), a
index
- the index at which to place the new attribute.list
- the list of attributes to add.
- true if the list changed.
java.util.ArrayList.addAll(int, Collection)
addAll
public boolean addAll(AttributeList list)
Adds all the
Attribute
s from the supplied list
to the end of this list, in the order they are returned
by the list's
Iterator
.
list
- the list of attributes to add.
- true if the list changed.
java.util.ArrayList.addAll(Collection)
set
public void set(int index,
Attribute attribute)
Replaces the attribute at the specified index with the one
supplied. If the index is invalid (i.e. it is smaller than
zero, or greater than the current size of the list), a
index
- the index at which to place the new attribute.attribute
- the new attribute to add.
java.util.ArrayList.set(int, Object)
AttributeList.java -- A list of MBean attributes.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.