All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.objectos.collections.base.BaseCollection Maven / Gradle / Ivy

package br.com.objectos.collections.base;

import br.com.objectos.latest.Generated;

/**
 * The base {@link java.util.Collection} interface for the Objectos Collections
 * API.
 *
 * 

* Implementations of this interface are required to reject {@code null} * elements. * * @param type of the elements in this collection * * @since 2 */ @Generated("br.com.objectos.latest.processor.TemplateProcessor") public interface BaseCollection extends java.util.Collection, Joinable, br.com.objectos.core.object.ToStringObject { /** * Adds the specified element to this collection. * * @param e * an element to be added to this collection * * @return {@code true} if this collection was modified as a result of this * operation * * @throws NullPointerException * if the specified element is {@code null} */ boolean add(E e); /** * Adds all of the elements of the specified collection to this collection. * * @param c * a collection containing the elements to be added to this collection * * @return {@code true} if this collection was modified as a result of this * operation * * @throws NullPointerException * if the specified collection is {@code null} or if any of its * element is null */ boolean addAll(java.util.Collection c); /** * Returns {@code true} if this collection contains all the given values. More * formally, and using the contains definition given by * {@link java.util.Collection#contains(Object)}, returns {@code true} if and * only if this collection contains the {@code first} specified element or if * contains any element of {@code rest} array. * *

* This method does not throw a {@code ClassCastException} if any of the * supplied values if of a type that is incompatible with this collection. * * @param first * the first element to check for presence in the collection * @param more * the additional elements to check for presence in the collection * * @return {@code true} if this collection contains any of the given values */ boolean contains(java.lang.Object first, java.lang.Object... more); /** * Returns the only element of this collection or throws an exception if the * collection is empty or if the collection contains more than one element. * * @return the only element of this collection * * @throws IllegalStateException * if the collection is empty or if the collection contains more than * one element */ E getOnly() throws java.lang.IllegalStateException; /** * Returns an unmodifiable iterator over the elements in this collection. * * @return an unmodifiable iterator over the elements in this collection */ br.com.objectos.collections.base.UnmodifiableIterator iterator(); /** * This operation is not supported. * *

* This method performs no operation other than throw an * {@link UnsupportedOperationException}. * * @param o * ignored (this operation is not supported) * * @return this method does not return as it always throw an exception * * @throws UnsupportedOperationException * always */ boolean remove(java.lang.Object o); /** * This operation is not supported. * *

* This method performs no operation other than throw an * {@link UnsupportedOperationException}. * * @param c * ignored (this operation is not supported) * * @return this method does not return as it always throw an exception * * @throws UnsupportedOperationException * always */ boolean removeAll(java.util.Collection c); /** * This operation is not supported. * *

* This method performs no operation other than throw an * {@link UnsupportedOperationException}. * * @param c * ignored (this operation is not supported) * * @return this method does not return as it always throw an exception * * @throws UnsupportedOperationException * always */ boolean retainAll(java.util.Collection c); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy