| java.lang.Object org.apache.harmony.rmi.common.ClassList
ClassList | final public class ClassList (Code) | | Stores list of classes (
Class instances), making sure
no duplicates are stored, and taking inheritance into account.
The classes are stores in order they were added, so that no class
in the list inherits any other class in the list. When each new class
is added to the list, all its superclasses (or subclasses, if
inverse flag was set in constructor) are removed from the list.
author: Vasily Zakharov version: $Revision: 1.1.2.2 $ |
Constructor Summary | |
public | ClassList() Creates empty list, equivalent to
ClassList.ClassList(boolean) ClassList(false) . | public | ClassList(boolean inverse) Creates empty list. | public | ClassList(Class[] classes) Creates list and all the elements from the specified array, equivalent to
ClassList.ClassList(Class[],boolean) ClassList(Class[], false) . | public | ClassList(Class[] classes, boolean inverse) Creates list and all the elements from the specified array. | public | ClassList(Collection classes) Creates list and all the elements from the specified collection,
equivalent to
ClassList.ClassList(Collection,boolean) ClassList(Collection, false) . | public | ClassList(Collection classes, boolean inverse) Creates list and all the elements from the specified collection. | public | ClassList(ClassList classes) Creates list and all the elements from the specified list, equivalent to
ClassList.ClassList(ClassList,boolean) ClassList(ClassList, false) . | public | ClassList(ClassList classes, boolean inverse) Creates list and all the elements from the specified list. |
Method Summary | |
public void | add(Class cls) Adds the specified class to the end of the list. | public void | addAll(Class[] classes) Adds the all classes in the specified array to the list. | public void | addAll(Collection classes) Adds the all classes in the specified collection to the list. | public void | addAll(ClassList classes) Adds the all classes in the specified list to this list. | public boolean | contains(Class cls) Returns true if the list contains the specified
class or any of its subclasses/superclasses (depending on
), false otherwise.
Parameters: cls - Class to check. | public Iterator | iterator() Returns an iterator over the elements
in this list in proper sequence. | public void | remove(Class cls) Removes the specified class from the list. | public String | toString() Returns string representation of this list. |
ClassList | public ClassList(boolean inverse)(Code) | | Creates empty list.
Parameters: inverse - Inverse flag, see . |
ClassList | public ClassList(Class[] classes)(Code) | | Creates list and all the elements from the specified array, equivalent to
ClassList.ClassList(Class[],boolean) ClassList(Class[], false) .
Parameters: classes - Initial classes to put to the list. |
ClassList | public ClassList(Class[] classes, boolean inverse)(Code) | | Creates list and all the elements from the specified array.
Parameters: classes - Initial classes to put to the list. Parameters: inverse - Inverse flag, see . |
ClassList | public ClassList(Collection classes, boolean inverse)(Code) | | Creates list and all the elements from the specified collection.
Parameters: classes - Initial classes to put to the list. Parameters: inverse - Inverse flag, see . |
ClassList | public ClassList(ClassList classes, boolean inverse)(Code) | | Creates list and all the elements from the specified list.
Parameters: classes - Initial classes to put to the list. Parameters: inverse - Inverse flag, see . |
add | public void add(Class cls)(Code) | | Adds the specified class to the end of the list. All its
superclasses/subclasses
(depending on
),
if present, are removed. If class itself or any of its
subclasses/superclasses is already present, nothing is done.
Parameters: cls - Class to add. |
addAll | public void addAll(Class[] classes)(Code) | | Adds the all classes in the specified array to the list.
See
ClassList.add(Class) for details.
Parameters: classes - Classes to add. |
addAll | public void addAll(Collection classes)(Code) | | Adds the all classes in the specified collection to the list.
See
ClassList.add(Class) for details.
Parameters: classes - Classes to add. |
addAll | public void addAll(ClassList classes)(Code) | | Adds the all classes in the specified list to this list.
See
ClassList.add(Class) for details.
Parameters: classes - Classes to add. |
contains | public boolean contains(Class cls)(Code) | | Returns true if the list contains the specified
class or any of its subclasses/superclasses (depending on
), false otherwise.
Parameters: cls - Class to check. true if the list contains the specifiedclass or any of its subclasses/superclasses (dependingon ), false otherwise. |
iterator | public Iterator iterator()(Code) | | Returns an iterator over the elements
in this list in proper sequence.
Iterator over the elements in this listin proper sequence. |
remove | public void remove(Class cls)(Code) | | Removes the specified class from the list.
If class itself is not present, but its superclasses/subclasses
(depending on
) are, they are removed.
Parameters: cls - Class to remove. |
toString | public String toString()(Code) | | Returns string representation of this list.
String representation of this list. |
|
|