File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ namespace Java {
3636 template <typename T>
3737 class Iterable {
3838 public:
39- virtual Iterator<T> &iterator () const = 0;
39+ // virtual Iterator<T> &iterator() const = 0;
4040 };
4141 }
4242}
Original file line number Diff line number Diff line change @@ -33,18 +33,11 @@ namespace Java {
3333 namespace Util {
3434 template <typename E>
3535 class AbstractSequentialList : public AbstractList <E> {
36+
3637 protected:
37- AbstractSequentialList ();
38- ~AbstractSequentialList ();
38+ AbstractSequentialList () {}
39+ virtual ~AbstractSequentialList () {}
3940
40- public:
41- virtual void add (int index, E element);
42- virtual boolean addAll (int index, Collection<E> c);
43- virtual E get (int index);
44- virtual Iterator<E> interactor ();
45- // ListIterator<E> listIterator(int index);
46- virtual E remove (int index);
47- virtual E set (int index, E element);
4841 };
4942 }
5043}
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ namespace Java {
207207 * @param o
208208 * @return boolean
209209 */
210- boolean contains (Object &o ) const {
210+ boolean contains (E &e ) const {
211211 // TODO
212212 return true ;
213213 }
@@ -261,7 +261,7 @@ namespace Java {
261261 * @param o
262262 * @return int
263263 */
264- int indexOf (Object &o ) const {
264+ int indexOf (E &e ) const {
265265 return 0 ;
266266 }
267267
@@ -292,7 +292,7 @@ namespace Java {
292292 * @param object
293293 * @return int
294294 */
295- int lastIndexOf (Object &object ) const {
295+ int lastIndexOf (E &e ) const {
296296 // TODO
297297 return 0 ;
298298 }
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ namespace Java {
5555 * @param c
5656 * @return boealn
5757 */
58- virtual boolean addAll (Collection<E> &c) = 0;
58+ // virtual boolean addAll(Collection<E> &c) = 0;//FIXME: should to implement foreach first
5959
6060 /* *
6161 * Clear all element inside this collection
@@ -68,16 +68,14 @@ namespace Java {
6868 * @param o
6969 * @return boolean
7070 */
71- virtual boolean contains (Object &o ) const = 0;
71+ virtual boolean contains (E &e ) const = 0;
7272
7373 /* *
7474 * Search for a Collection of object, return true if all element inside <c> occurs inside this collection
7575 * @param c
7676 * @return booealeam
7777 */
78- boolean containsAll (Collection<Object> &c) {
79- return true ;
80- }
78+ // boolean containsAll(Collection<Object> &c);//FIXME: should to implement foreach first
8179
8280 /* *
8381 * Compare object <o> with this collection through hashCode(), return true if it is equal
@@ -98,12 +96,6 @@ namespace Java {
9896 */
9997 virtual boolean isEmpty () const = 0;
10098
101- /* *
102- * Return an iterator at the start of this object
103- * @return
104- */
105- virtual Iterator<E> &iterator () const = 0;
106-
10799 /* *
108100 * Don't support this method
109101 * @return
You can’t perform that action at this time.
0 commit comments