1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
|
/*******************************************************************************
copyright: Copyright (c) 2008 Kris Bell. All rights reserved
license: BSD style: $(LICENSE)
version: Apr 2008: Initial release
authors: Kris
Since: 0.99.7
*******************************************************************************/
module tango.util.container.model.IContainer;
/*******************************************************************************
Generic container
*******************************************************************************/
interface IContainer (V)
{
const size_t size ();
const bool isEmpty ();
IContainer dup ();
IContainer clear ();
IContainer reset ();
IContainer check ();
bool contains (V value);
bool take (ref V element);
V[] toArray (V[] dst = null);
size_t remove (V element, bool all);
int opApply (scope int delegate(ref V value) dg);
size_t replace (V oldElement, V newElement, bool all);
}
/*******************************************************************************
Comparator function
*******************************************************************************/
template Compare (V)
{
alias int function (ref V a, ref V b) Compare;
}
|