Module org.jhotdraw8.icollection
Class AbstractReadOnlyCollection<E>
java.lang.Object
org.jhotdraw8.icollection.readonly.AbstractReadOnlyCollection<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterable<E>,ReadOnlyCollection<E>
- Direct Known Subclasses:
AbstractReadOnlyList,AbstractReadOnlySet,ReadOnlyCollectionFacade
Abstract base class for
ReadOnlyCollections.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyCollection
asCollection, characteristics, containsAll, isEmpty, iterator, size, stream, toArray, toArray
-
Constructor Details
-
AbstractReadOnlyCollection
public AbstractReadOnlyCollection()Sole constructor. (For invocation by subclass constructors, typically implicit.).
-
-
Method Details
-
toString
Returns a string representation of this collection. The string representation consists of a list of the collection's elements in the order they are returned by its iterator, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters", "(comma and space). Elements are converted to strings as byString.valueOf(Object). -
contains
Description copied from interface:ReadOnlyCollectionReturnstrueif this collection contains the specified object.- Specified by:
containsin interfaceReadOnlyCollection<E>- Parameters:
o- an object- Returns:
trueif this collection contains the specified object
-