72 lines
2.1 KiB
Java
72 lines
2.1 KiB
Java
/*
|
|
* Copyright (c) 2002,2008 Declarative Engineering LLC.
|
|
* All rights reserved. This program and the accompanying materials
|
|
* are made available under the terms of the Declarative Engineering LLC
|
|
* verson 1 which accompanies this distribution, and is available at
|
|
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
|
*/
|
|
package com.common.util.optimized;
|
|
|
|
import java.io.Externalizable;
|
|
|
|
public interface IIntArray extends Cloneable, Externalizable {
|
|
/**
|
|
* Adds a value to the collection.
|
|
* @param value The value to add to the collection.
|
|
*/
|
|
public void add(int value);
|
|
/**
|
|
* Adds a value to the collection at the given index.
|
|
* @param value The value to add to the collection.
|
|
* @param index The index of the new value.
|
|
*/
|
|
public void add(int index, int value);
|
|
/**
|
|
* Gets a value at a given index.
|
|
* @param index The index of the value to retrieve.
|
|
* @return The value at that index.
|
|
*/
|
|
public int get(int index);
|
|
/**
|
|
* Gets the number of values in the collection.
|
|
* @return The number of values stored in this collection.
|
|
*/
|
|
public int getSize();
|
|
/**
|
|
* Gets an iterator over the values in this collection.
|
|
* @return An iterator over the collection values.
|
|
*/
|
|
public IIntIterator iterator();
|
|
/**
|
|
* Removes a value from the collection by its' index.
|
|
* @param index The index of the value to remove from the collection.
|
|
* @return The value at the removed index.
|
|
*/
|
|
public int remove(int index);
|
|
/**
|
|
* Removes the first value from the array.
|
|
* @return The value removed.
|
|
*/
|
|
public int removeFirst();
|
|
/**
|
|
* Removes the last value from the array.
|
|
* @return The value removed.
|
|
*/
|
|
public int removeLast();
|
|
/**
|
|
* Removes all collection values.
|
|
* @return Whether all values were properly removed.
|
|
*/
|
|
public boolean removeAll();
|
|
/**
|
|
* Replaces a value in the collection at a specific index, with a new value.
|
|
* @param index The index of the value to remove from the collection.
|
|
* @param value The new value at the given index.
|
|
*/
|
|
public void replace(int index, int value);
|
|
/**
|
|
* Clones the collection.
|
|
* @return The clone.
|
|
*/
|
|
public Object clone();
|
|
}//IIntArray// |