@@ -43,38 +43,141 @@ namespace Java {
4343 template <typename E>
4444 class Collection : public virtual Iterable<E> {
4545 public:
46+ /* *
47+ * Add a element to this collection
48+ * @param e
49+ * @return boolean
50+ */
4651 virtual boolean add (E &e) = 0;
52+
53+ /* *
54+ * Add a Collection element to this collection
55+ * @param c
56+ * @return boealn
57+ */
4758 virtual boolean addAll (Collection<E> &c) = 0;
59+
60+ /* *
61+ * Clear all element inside this collection
62+ * @return
63+ */
4864 virtual void clear () = 0;
65+
66+ /* *
67+ * Search for specified object, return true if it occurs
68+ * @param o
69+ * @return boolean
70+ */
4971 virtual boolean contains (Object &o) const = 0;
50- boolean containsAll (Collection<Object> &c) {
72+
73+ /* *
74+ * Search for a Collection of object, return true if all element inside <c> occurs inside this collection
75+ * @param c
76+ * @return booealeam
77+ */
78+ boolean containsAll (Collection<Object> &c) {
5179 return true ;
5280 }
81+
82+ /* *
83+ * Compare object <o> with this collection through hashCode(), return true if it is equal
84+ * @param o
85+ * @return boolean
86+ */
5387 virtual boolean equals (Object &o) const = 0;
88+
89+ /* *
90+ * Make a hashcode through this virtual address on memory
91+ * @return int
92+ */
5493 virtual int hashCode () const = 0;
94+
95+ /* *
96+ * A hash code value for this object.
97+ * @return int
98+ */
5599 virtual boolean isEmpty () const = 0;
100+
101+ /* *
102+ * Return an iterator at the start of this object
103+ * @return
104+ */
56105 virtual Iterator<E> &iterator () const = 0;
57- Java::Util::Stream::Stream<E> ¶llelStream () {
58- }
106+
107+ /* *
108+ * Don't support this method
109+ * @return
110+ */
111+ // Java::Util::Stream::Stream<E> ¶llelStream();
112+
113+ /* *
114+ * Remove a specified object inside this collection, return true if it exits and be removed also
115+ * @param o
116+ * @return boolean
117+ */
59118 virtual boolean remove (Object &o) = 0;
119+
120+ /* *
121+ * Remove a collection of object inside this collection, return true if it exits and be removed all also
122+ * @param c
123+ * @return
124+ */
60125 virtual boolean removeAll (Collection<Object> &c) = 0;
61- virtual boolean removeIf (Java::Util::Function::Predicate<E> &filter) = 0;
62- virtual boolean retainAll (Collection<Object> &c) = 0;
126+
127+ /* *
128+ * Don't support this method
129+ * @param filter
130+ * @return
131+ */
132+ // virtual boolean removeIf(Java::Util::Function::Predicate<E> &filter) = 0;
133+
134+ /* *
135+ * Don't support this method
136+ * @return
137+ */
138+ // virtual boolean retainAll(Collection<Object> &c) = 0;
139+
140+ /* *
141+ * Return number of element inside this collection
142+ * @return
143+ */
63144 virtual int size () const = 0;
64- Spliterator<E> &spliterator () {
65- Spliterator<E> spliterator;
66- return spliterator;
67- }
68- Java::Util::Stream::Stream<E> &stream () {
69- Java::Util::Stream::Stream<E> *stream = new Java::Util::Stream::Stream<E>();
70- return *stream;
71- }
72- Array<Object> &toArray () {
73- Array<Object> *array = new Array<Object>();
74- return *array;
75- }
76- template <typename T>
77- Array<T> toArray (Array<T> &a) const ;
145+
146+ /* *
147+ * Don't support this method
148+ * @return
149+ */
150+ // Spliterator<E> &spliterator() {
151+ // Spliterator<E> spliterator;
152+ // return spliterator;
153+ // }
154+
155+ /* *
156+ * Don't support this method
157+ * @return
158+ */
159+ // Java::Util::Stream::Stream<E> &stream() {
160+ // Java::Util::Stream::Stream<E> *stream = new Java::Util::Stream::Stream<E>();
161+ // return *stream;
162+ // }
163+
164+ /* *
165+ * Don't support this method
166+ * @return
167+ */
168+ // Array<Object> &toArray() {
169+ // Array<Object> *array = new Array<Object>();
170+ // return *array;
171+ // }
172+
173+ /* *
174+ * Don't suppor this method
175+ * @param a
176+ * @return
177+ */
178+ // template <typename T>
179+ // Array<T> toArray(Array<T> &a) const;
180+
78181 };
79182 }
80183}
0 commit comments