public class ViewCollection extends AbstractCollection<View>
Contains a list of View
objects.
Extends AbstractCollection<View>
class.
Modifier and Type | Method and Description |
---|---|
boolean |
add(View item)
Adds the specified item to this collection.
|
void |
clear()
Removes all items from this collection.
|
boolean |
contains(View item)
Returns true if the specified item is found in this collection; otherwise, false.
|
void |
copyTo(View[] array,
int arrayIndex)
Copies the elements of this collection to the specified array, starting at the specified array index.
|
Project |
getParentProject()
Gets the parent of the View object.
|
Iterator<View> |
iterator()
Returns an iterator over the elements contained in this collection.
|
boolean |
remove(View item)
Removes the first occurrence of a specific object from this collection.
|
int |
size()
Gets the number of elements contained in this collection.
|
List<View> |
toList()
Converts a view collection to a list of
View objects. |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
public final boolean add(View item)
Adds the specified item to this collection.
add
in interface Collection<View>
add
in class AbstractCollection<View>
item
- the specified item to add to this collection.public final void clear()
Removes all items from this collection.
clear
in interface Collection<View>
clear
in class AbstractCollection<View>
public final boolean contains(View item)
Returns true if the specified item is found in this collection; otherwise, false.
item
- the specified item to find.public final void copyTo(View[] array, int arrayIndex)
Copies the elements of this collection to the specified array, starting at the specified array index.
array
- the specified one-dimensional array to copy elements toarrayIndex
- the zero-based index of the specified array at which copying begins.public final Project getParentProject()
Gets the parent of the View object.
Read-only Project
.
public Iterator<View> iterator()
iterator
in interface Iterable<View>
iterator
in interface Collection<View>
iterator
in class AbstractCollection<View>
public final boolean remove(View item)
Removes the first occurrence of a specific object from this collection.
item
- the specified object to remove.public final int size()
Gets the number of elements contained in this collection.
size
in interface Collection<View>
size
in class AbstractCollection<View>