TreeSet.h

Go to the documentation of this file.
00001 #ifndef JAVA_UTIL_TREESET_H
00002 #define JAVA_UTIL_TREESET_H 1
00003 
00004 #ifndef JAVA_UTIL_ABSTRACTSET_H
00005 #include <java_util/AbstractSet.h>
00006 #endif /* JAVA_UTIL_ABSTRACTSET_H */
00007 #ifndef JAVA_UTIL_SORTEDSET_H
00008 #include <java_util/SortedSet.h>
00009 #endif /* JAVA_UTIL_SORTEDSET_H */
00010 #ifndef JAVA_UTIL_SORTEDMAP_H
00011 #include <java_util/SortedMap.h>
00012 #endif /* JAVA_UTIL_SORTEDMAP_H */
00013 
00014 namespace java {
00015   namespace util {
00016 
00076     class JAVA_UTIL_SPEC TreeSet : public AbstractSet, virtual public SortedSet {
00077 
00078     public:
00079 
00093       TreeSet(const Ref<Comparator>& comp = 0);
00094 
00110       TreeSet(const Collection& c);
00111 
00119       TreeSet(const SortedSet& s);
00120 
00128       virtual jint size() const;
00129 
00137       virtual jboolean isEmpty() const;
00138 
00151       virtual jboolean contains(const ObjectRef& o) const;
00152 
00168       virtual Array<ObjectRef> toArray() const;
00169 
00178       virtual Ref<Iterator> iterator() const;
00179 
00211       virtual jboolean add(const ObjectRef& o);
00212 
00237       virtual jboolean remove(const ObjectRef& o);
00238 
00255       virtual jboolean containsAll(const Collection& c) const;
00256 
00267       virtual jboolean addAll(const Collection& c);
00268 
00294       virtual jboolean removeAll(const Collection& c);
00295 
00323       virtual jboolean retainAll(const Collection& c);
00324 
00343       virtual void clear();
00344 
00352       virtual Ref<Comparator> comparator() const;
00353 
00406       virtual Ref<SortedSet> subSet(const ObjectRef& fromElement, const ObjectRef& toElement) const;
00407 
00443       virtual Ref<SortedSet> headSet(const ObjectRef& toElement) const;
00444 
00480       virtual Ref<SortedSet> tailSet(const ObjectRef& fromElement) const;
00481 
00488       virtual ObjectRef first() const;
00489 
00496       virtual ObjectRef last() const;
00497 
00515       virtual jboolean equals(const Object& o) const;
00516 
00531       virtual jint hashCode() const;
00532 
00550       virtual String toString() const;
00551 
00552     private:
00553 
00554       Ref<SortedMap> impl;
00555       REGISTER_MEMBERS;
00556 
00557     };
00558 
00559   } // namespace util
00560 } // namespace java
00561 
00562 #endif /* TREESET_H */

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