Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

Interface «eoos::api::List<T>»

List interface.

public: virtual ~List();

Destructor.

public: virtual bool_t add(int32_t index, T const& element);

Inserts new element to the specified position in this container.

Parameters:
index — A position in this container.
element — An inserting element.

Returns:
True if element is inserted.

public: virtual bool_t add(T const& element);

Inserts new element to the end of this container.

Parameters:
element — An inserting element.

Returns:
True if element is added.

public: virtual void clear();

Removes all elements from this container.

public: virtual T& get(int32_t index);

Returns an element from this container by index.

Parameters:
index — Position in this container.

Returns:
Indexed element of this container.

public: virtual T& getFirst();

Returns the first element in this container.

Returns:
The first element in this container.

public: virtual T const& getIllegal();

Returns illegal element which will be returned as error value.

Returns:
Illegal element.

public: virtual int32_t getIndexOf(T const& element) const;

Returns the index of the first occurrence of the specified element in this container.

Parameters:
element — Reference to the element.

Returns:
Index or -1 if this container does not contain the element.

public: virtual T& getLast();

Returns the last element in this container.

Returns:
The last element in this container.

public: virtual size_t getLength();

Returns a number of elements in this container.

Returns:
Number of elements, or always 0 if an error occurred.

public: virtual api::ListIterator<T>* getListIterator(int32_t index=0);

Parameters:
index — Start position in this container.

Returns:
Pointer to new list iterator.

public: virtual bool_t isConstructed() const;

Tests if this object has been constructed.

Returns:
True if object has been constructed successfully.

public: virtual bool_t isEmpty();

Tests if this collection has elements.

Returns:
True if this collection does not contain any elements, or always true if an error occurred.

public: virtual bool_t isIllegal(T const& value) const;

Tests if given value is an illegal.

Parameters:
value — A testing value.

Returns:
True if value is an illegal.

public: virtual bool_t isIndex(int32_t index) const;

Tests if given index is available.

Parameters:
index — Checking position in this container.

Returns:
True if index is present.

public: virtual bool_t remove(int32_t index);

Removes the element at the specified position in this container.

Parameters:
index — Position in this container.

Returns:
True if an element is removed successfully.

public: virtual bool_t removeElement(T const& element);

Removes the first occurrence of the specified element from this container.

Parameters:
element — Reference to element.

Returns:
True if an element is removed successfully.

public: virtual bool_t removeFirst();

Removes the first element from this container.

Returns:
True if an element is removed successfully.

public: virtual bool_t removeLast();

Removes the last element from this container.

Returns:
True if an element is removed successfully.

public: virtual void setIllegal(T const& value);

Sets illegal element which will be returned as error value.

Parameters:
value — An illegal value.

Back to class list