List.h

Go to the documentation of this file.
00001 #ifndef JAVA_UTIL_LIST_H
00002 #define JAVA_UTIL_LIST_H 1
00003 
00004 #ifndef JAVA_UTIL_COLLECTION_H
00005 #include <java_util/Collection.h>
00006 #endif /* JAVA_UTIL_COLLECTION_H */
00007 #ifndef JAVA_UTIL_LISTITERATOR_H
00008 #include <java_util/ListIterator.h>
00009 #endif /* JAVA_UTIL_LISTITERATOR_H */
00010 
00011 namespace java {
00012   namespace util {
00013 
00088     class JAVA_UTIL_SPEC List : virtual public Collection {
00089 
00090     public:
00091 
00095       static Ref<List> emptyList();
00096 
00104       static Ref<List> singletonList(const ObjectRef& o);
00105 
00131       static Ref<List> synchronizedList(const Ref<List>& c, const Ref<Sync>& sync = 0);
00132 
00149       static Ref<List> immutableList(const Ref<List>& c);
00150 
00175       virtual jboolean add(const ObjectRef& o) = 0;
00176 
00197       virtual void add(jint index, const ObjectRef& element) = 0;
00198 
00215       virtual jboolean remove(const ObjectRef& o) = 0;
00216 
00231       virtual ObjectRef remove(jint index) = 0;
00232 
00256       virtual jboolean addAll(const Collection& c) = 0;
00257 
00288       virtual jboolean addAll(jint index, const Collection& c) = 0;
00289 
00299       virtual ObjectRef get(jint index) const = 0;
00300 
00320       virtual ObjectRef set(jint index, const ObjectRef& element) = 0;
00321 
00337       virtual jint indexOf(const ObjectRef& o) const = 0;
00338 
00354       virtual jint lastIndexOf(const ObjectRef& o) const = 0;
00355 
00371       virtual Ref<ListIterator> listIterator(jint index = 0) const = 0;
00372 
00407       virtual Ref<List> subList(jint fromIndex, jint toIndex) const = 0;
00408 
00409     private:
00410 
00411       REGISTER_MEMBERS;
00412 
00413     };
00414 
00415   } // namespace util
00416 } // namespace java
00417 
00418 #endif /* JAVA_UTIL_LIST_H */

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