LinkedList.h

Go to the documentation of this file.
00001 #ifndef JAVA_UTIL_LINKEDLIST_H
00002 #define JAVA_UTIL_LINKEDLIST_H 1
00003 
00004 #ifndef JAVA_UTIL_ABSTRACTSEQUENTIALLIST_H
00005 #include <java_util/AbstractSequentialList.h>
00006 #endif /* JAVA_UTIL_ABSTRACTSEQUENTIALLIST_H */
00007 
00008 namespace java {
00009   namespace util {
00010 
00067     class JAVA_UTIL_SPEC LinkedList : public AbstractSequentialList {
00068 
00069     public:
00070 
00074       LinkedList();
00075 
00084       LinkedList(const Collection& c);
00085       LinkedList(const LinkedList& ll);
00086 
00093       virtual ObjectRef getFirst() const;
00094 
00101       virtual ObjectRef getLast() const;
00102 
00109       virtual ObjectRef removeFirst();
00110 
00117       virtual ObjectRef removeLast();
00118 
00124       virtual void addFirst(const ObjectRef& o);
00125 
00132       virtual void addLast(const ObjectRef& o);
00133 
00146       virtual jboolean contains(const ObjectRef& o) const;
00147 
00153       virtual jint size() const;
00154 
00162       virtual jboolean add(const ObjectRef& o);
00163 
00174       virtual jboolean remove(const ObjectRef& o);
00175 
00188       virtual jboolean addAll(const Collection& c);
00189 
00206       virtual jboolean addAll(jint index, const Collection& c);    
00207 
00211       virtual void clear();
00212 
00222       virtual ObjectRef get(jint index) const;
00223 
00234       virtual ObjectRef set(jint index, const ObjectRef& element);
00235 
00247       virtual void add(jint index, const ObjectRef& element);
00248     
00260       virtual ObjectRef remove(jint index);    
00261 
00274       virtual jint indexOf(const ObjectRef& o) const;    
00275 
00288       virtual jint lastIndexOf(const ObjectRef& o) const;
00289 
00297       virtual Array<ObjectRef> toArray() const;
00298 
00314       virtual Ref<ListIterator> listIterator(jint index = 0) const;
00315 
00316     private:
00317 
00318       ObjectRef impl;
00319       REGISTER_MEMBERS;
00320 
00321     };
00322 
00323   } // namespace util
00324 } // namespace java
00325 
00326 #endif /* JAVA_UTIL_LINKEDLIST_H */

Generated on Fri May 16 11:54:43 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3