Go to the documentation of this file.
18 #ifndef __LIBSTD_SEQUENCE_H
19 #define __LIBSTD_SEQUENCE_H
77 for (
Size i = 0; i < s; i++)
112 for (
Size i = 0; i < s; i++)
123 virtual const T *
get(
Size position)
const = 0;
134 virtual const T &
at(
Size position)
const = 0;
143 for (
Size i = 0; i < sz; i++)
160 return s.
size() - sz;
163 if (s.
count() != cnt)
164 return s.
count() - cnt;
167 for (
Size i = 0; i < cnt; i++)
169 if (
at(i) != s.
at(i))
virtual bool insert(Size position, const T &item)
Inserts the given item at the given position.
virtual Size count() const =0
Returns the number of items inside the Container.
virtual int remove(T value)
Remove all items with the given value.
virtual const T * get(Size position) const =0
Returns the item at the given position.
Containers provide access to stored items.
virtual const T & at(Size position) const =0
Returns a reference to the item at the given position.
virtual bool contains(const T value) const
Check if the given item is stored in this Sequence.
virtual bool removeAt(Size position)
Removes the item at the given position.
Objects which can be compared to each other.
virtual void fill(T value)
Fill the Sequence with the given value.
Sequences are containers that provide indexed based storage of items.
virtual void clear()
Removes all items from the Sequence.
virtual int insert(const T &item)
Adds the given item to the Sequence, if possible.
const T & operator[](int i) const
Returns the item at the given position in the Sequence.
unsigned int Size
Any sane size indicator cannot go negative.
virtual bool equals(const Sequence< T > &s) const
Test if this Sequence is equal to an other Sequence.
virtual Size size() const =0
Returns the maximum size of this Container.
virtual int compareTo(const Sequence< T > &s) const
Compare this Sequence to another Sequence.