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

com.bmd.android.collection.iterator.IntSparseIterable Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bmd.android.collection.iterator;

import com.bmd.android.collection.filter.Filter;
import com.bmd.android.collection.filter.IntFilterBuilder;

import java.util.Collection;

/**
 * This interface extends the {@link com.bmd.android.collection.iterator.ElementSparseIterable} one
 * by adding specific methods handling int elements.
 * 

* Created by davide on 3/10/14. */ public interface IntSparseIterable extends ElementSparseIterable { @Override public IntFilterBuilder but(); @Override public IntSparseIterable but(Filter filter); @Override public IntSparseIterable doWhile(Condition condition); @Override public IntSparseIterable forEach(Action action); @Override public IntFilterBuilder only(); @Override public IntSparseIterable only(Filter filter); @Override public IntSparseIterable remove(); @Override public IntSparseIterable retain(); @Override public IntSparseIterable reverse(); @Override public IntSparseIterable fill(Collection collection); /** * Fills the specified array with the elements returned by this iterable, in the iteration * order, starting from the index 0 of the array. *

* Note that, in case the array is not big enough to contain all the elements, an * {@link java.lang.IndexOutOfBoundsException} will be thrown. * * @param array The array to fill. * @return This iterable. */ public IntSparseIterable fill(int[] array); /** * Fills the specified array with the elements returned by this iterable, in the iteration * order, starting from the specified offset inside the array. *

* Note that, in case the array is not big enough to contain all the elements, an * {@link java.lang.IndexOutOfBoundsException} will be thrown. * * @param array The array to fill. * @param offset The offset from which to start filling the array. * @return This iterable. */ public IntSparseIterable fill(int[] array, int offset); /** * Creates and returns a new array filled with the elements returned by this iterable, in the * iteration order. * * @return The new array. */ public int[] toArray(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy