Merge "Update deprecated libprivilege-control API functions." into tizen
[platform/framework/native/appfw.git] / inc / FBaseColArrayList.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                FBaseColArrayList.h
19  * @brief               This is the header file for the %ArrayList class.
20  *
21  * This header file contains the declarations of the %ArrayList class.
22  */
23 #ifndef _FBASE_COL_ARRAY_LIST_H_
24 #define _FBASE_COL_ARRAY_LIST_H_
25
26 #include <FBaseObject.h>
27 #include <FBaseColIComparer.h>
28 #include <FBaseColIList.h>
29
30
31 namespace Tizen { namespace Base { namespace Collection
32 {
33
34 /**
35  * @class ArrayList
36  * @brief This class represents a collection of objects that can be individually accessed by an index.
37  *
38  * @since 2.0
39  *
40  *
41  * The %ArrayList class represents a collection of objects that can be individually accessed by an index.
42  *
43  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/base/arraylist_linkedlist.htm">ArrayList and LinkedList</a>.
44  *
45  * The following example demonstrates how to use the %ArrayList class.
46  *
47  * @code
48  *
49  *      #include <FBase.h>
50  *
51  *      using namespace Tizen::Base;
52  *      using namespace Tizen::Base::Collection;
53  *
54  *
55  *      void
56  *      MyClass::ArrayListSample(void)
57  *      {
58  *              ArrayList       list(SingleObjectDeleter);
59  *
60  *              list.Construct();
61  *
62  *              list.Add(new Integer(1));       // 1
63  *              list.Add(new Integer(2));       // 1,2
64  *              list.Add(new Integer(3));       // 1,2,3
65  *
66  *              Integer*        pInt = static_cast< Integer* > (list.GetAt(0));
67  *
68  *              if (pInt->Equals(Integer(1)))
69  *              {
70  *                      // Must be here
71  *              }
72  *
73  *              list.InsertAt(new Integer(4), 1);       // 1,4,2,3
74  *
75  *              list.Remove(Integer(3));                // 1,4,2
76  *
77  *              list.RemoveAt(0);                               // 4,2
78  *
79  *              list.Sort(IntegerComparer());   // 2,4
80  *
81  *              // Uses an enumerator to access elements in the list
82  *              IEnumerator*    pEnum = list.GetEnumeratorN();
83  *              Object*         pObj = null;
84  *              while (pEnum->MoveNext() == E_SUCCESS)
85  *              {
86  *                      pObj = pEnum->GetCurrent();
87  *              }
88  *
89  *              delete pEnum;
90  *
91  *
92  *              // Deallocates all objects
93  *              // Because the destructor calls RemoveAll() internally, you do not need to call RemoveAll() to destroy all elements at the end.
94  *              // list.RemoveAll();
95  *      }
96  * @endcode
97  */
98 class _OSP_EXPORT_ ArrayList
99         : public IList
100         , public Object
101 {
102 public:
103         using IList::Add;
104         using IList::InsertAt;
105         using IList::Remove;
106         using IList::RemoveAt;
107         using IList::RemoveItems;
108         using IList::RemoveAll;
109         using IList::SetAt;
110         using IList::ContainsAll;
111         /**
112          * This is the default constructor for this class.
113          *
114          * @since 2.0
115          *
116          * @param[in]   deleter The function pointer to type of the element deleter
117          * @remarks             To create an owning collection, set the element deleter value as @c SingleObjectDeleter. This gives the collection the ownership of elements and the collection will destroy elements. @n
118          *                              On the other hand, to create a non-owning collection, you do not need to set the element deleter value, as @c NoOpDeleter is the default element deleter.
119          *                              It means that you do not transfer the ownership of elements to the collection.
120          * @remarks             After creating an instance of the %ArrayList class, one of the Construct() methods must be called explicitly to initialize this instance.
121          * @see                 NoOpDeleter()
122          * @see                 SingleObjectDeleter()
123          * @see                 ArrayDeleter()
124          */
125         explicit ArrayList(DeleterFunctionType deleter = NoOpDeleter);
126
127         /**
128          * This destructor overrides Tizen::Base::Object::~Object().
129          *
130          * @since 2.0
131          */
132         virtual ~ArrayList(void);
133
134         /**
135          * Initializes this instance of %ArrayList with the specified parameter and sets its initial capacity to the
136          * indicated value.
137          *
138          * @since 2.0
139          *
140          * @return              An error code
141          * @param[in]   capacity        The number of elements @n
142          *                                                      The default capacity is @c 10.
143          * @exception   E_SUCCESS                 The method is successful.
144          * @exception   E_INVALID_ARG     A specified input parameter is invalid, or
145          *                                                                the specified @c capacity is negative.
146          * @remarks             If the number of elements added to the list reaches the current capacity,
147          *                              the capacity is automatically increased by memory reallocation.
148          *                              Therefore, if the size of the list can be estimated,
149          *                              specifying the initial capacity eliminates the need to perform a number of
150          *                              resizing operations while adding elements to the list.
151          * @see                 ArrayList()
152          */
153         result Construct(int capacity = DEFAULT_CAPACITY);
154
155
156         /**
157          * Initializes this instance of %ArrayList by copying the elements of the specified
158          * @c collection. @n
159          * The capacity of the list is the same as the number of elements copied.
160          *
161          * @since 2.0
162          *
163          * @return              An error code
164          * @param[in]   collection                      A collection to add
165          * @exception   E_SUCCESS                       The method is successful.
166          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation, or
167          *                                                                      the @c collection is modified during the operation of this method.
168          * @remarks             This method performs a shallow copy. It copies just the pointer; not the element itself.
169          * @see                 ArrayList()
170          */
171         result Construct(const ICollection& collection);
172
173         /**
174          * Adds the specified object to the end of this list.
175          *
176          * @since 2.0
177          *
178          * @return              An error code
179          * @param[in]   pObj                    An pointer to object to add
180          * @exception   E_SUCCESS               The method is successful.
181          * @exception   E_INVALID_ARG   The specified input parameter is invalid.
182          * @remarks             This method performs a shallow copy. It adds just the pointer; not the element itself.
183          * @see                 Remove()
184          */
185         virtual result Add(Object* pObj);
186
187
188         /**
189          * Adds the elements of the specified @c collection to the end of this list.
190          *
191          * @since 2.0
192          *
193          * @return              An error code
194          * @param[in]   collection                      A collection to add
195          * @exception   E_SUCCESS                       The method is successful.
196          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation, or
197          *                                                                      the @c collection is modified during the operation of this method.
198          * @remarks             This method performs a shallow copy. It adds just the pointer; not the element itself.
199          * @see                 RemoveItems()
200          */
201         virtual result AddItems(const ICollection& collection);
202
203
204         /**
205          * Gets an enumerator (an instance of the IEnumerator-derived class) of this list.
206          *
207          * @since 2.0
208          *
209          * @return              An instance of the IEnumerator-derived class, @n
210          *                              else @c null if some exception occurs
211          * @remarks             The specific error code can be accessed using the GetLastResult() method.
212          */
213         virtual IEnumerator* GetEnumeratorN(void) const;
214
215         /**
216          * Gets a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class) of this list.
217          *
218          * @since 2.0
219          *
220          * @return                      An instance of the IBidirectionalEnumerator derived class, @n
221          *                                      else @c null if some exception occurs
222          * @remarks                     Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class)
223          *                                      to iterate over a collection (an instance of the IList derived class).
224          *                                      The specific error code can be accessed using GetLastResult() method.
225          * @see                         Tizen::Base::Collection::IBidirectionalEnumerator
226          */
227         virtual IBidirectionalEnumerator* GetBidirectionalEnumeratorN(void) const;
228
229         /**
230          * Gets the object at the specified @c index of this list.
231          *
232          * @since 2.0
233          *
234          * @return              The object at the specified @c index of this list, @n
235          *                              else @c null if the index is not valid
236          * @param[in]   index                                   The index of the object in the calling list to read
237          * @exception   E_SUCCESS                               The method is successful.
238          * @exception   E_OUT_OF_RANGE                  The specified @c index is outside the bounds of the data structure, or
239          *                                                                              the specified @c index is either equal to or greater than the number of elements or less than @c 0.
240          * @remarks             The specific error code can be accessed using the GetLastResult() method.
241          * @see                 SetAt()
242          */
243         virtual const Object* GetAt(int index) const;
244
245
246         /**
247          * Gets the object at the specified @c index of this list.
248          *
249          * @since 2.0
250          *
251          * @return              The object at the specified @c index of this list, @n
252          *                              else @c null if the index is not valid
253          * @param[in]   index   The index of the object to read
254          * @exception   E_SUCCESS                               The method is successful.
255          * @exception   E_OUT_OF_RANGE                  The specified @c index is outside the bounds of the data structure, or
256          *                                                                              the specified @c index is either equal to or greater than the number of elements or less than @c 0.
257          * @remarks             The specific error code can be accessed using the GetLastResult() method.
258          * @see                 SetAt()
259          */
260         virtual Object* GetAt(int index);
261
262         /**
263          * Gets the reference of the object at the specified @c index of this list.
264          *
265          * @since               3.0
266          *
267          * @return              The reference of the object at the specified @c index of this list
268          * @param[in]           index   The index of the object to read
269          * @exception   E_SUCCESS                               The method is successful.
270          * @exception   E_OUT_OF_RANGE                  The specified @c index is outside the bounds of the data structure, or
271          *                                                                              the specified @c index is either equal to or greater than the number of elements or less than @c 0.
272          * @remarks             The specific error code can be accessed using the GetLastResult() method.
273          */
274         virtual Object*& GetAtRef(int index);
275
276         /**
277          * Gets the IList within the specified range of this list.
278          *
279          * @since 2.0
280          *
281          * @return              A pointer to IList, @n
282          *                              else @c null if some exception occurs
283          * @param[in]   startIndex      The starting index of the range
284          * @param[in]   count           The number of elements to read
285          * @exception   E_SUCCESS                               The method is successful.
286          * @exception   E_OUT_OF_RANGE                  Either of the following conditions has occurred: @n
287          *                                                                              - The specified index is outside the bounds of the data structure. @n
288          *                                                                              - The specified @c startIndex is either equal to or greater than the number of elements or less than @c 0. @n
289          *                                                                              - The @c count is greater than the number of elements starting from @c startIndex
290          *                                                                              or less than @c 0.
291          * @remarks             The IList stores just the pointers to the elements in the list, not the elements themselves.
292          *              The specific error code can be accessed using the GetLastResult() method.
293          */
294         virtual IList* GetItemsN(int startIndex, int count) const;
295
296         /**
297          * Searches for an object in this list. @n
298          * Gets the index of the object if found.
299          *
300          * @since 2.0
301          *
302          * @return              An error code
303          * @param[in]   obj         The object to locate
304          * @param[out]  index           The index of the object
305          * @exception   E_SUCCESS               The method is successful.
306          * @exception   E_OBJ_NOT_FOUND The specified @c obj is not found.
307          * @see                 LastIndexOf()
308          */
309         virtual result IndexOf(const Object& obj, int& index) const;
310
311         /**
312          * Searches for an object starting from the specified index. @n
313          * Gets the index of the object if found.
314          *
315          * @since 2.0
316          *
317          * @return              An error code
318          * @param[in]   obj         The object to locate
319          * @param[in]   startIndex      The starting index for the search @n
320          *                                                      It must be less than the number of elements.
321          * @param[out]  index           The index of the object
322          * @exception   E_SUCCESS                               The method is successful.
323          * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
324          *                                                                              the specified @c startIndex is either equal to or greater than the number of elements or less than @c 0.
325          * @exception   E_OBJ_NOT_FOUND                 The specified @c obj is not found.
326          * @see                 LastIndexOf()
327          */
328         virtual result IndexOf(const Object& obj, int startIndex, int& index) const;
329
330         /**
331          * Searches for an object within the specified range. @n
332          * Gets the index of the object if found.
333          *
334          * @since 2.0
335          *
336          * @return              An error code
337          * @param[in]   obj         The object to locate
338          * @param[in]   startIndex      The starting index of the range
339          * @param[in]   count           The number of elements to read
340          * @param[out]  index           The index of the object
341          * @exception   E_SUCCESS                               The method is successful.
342          * @exception   E_OUT_OF_RANGE                  Either of the following conditions has occurred: @n
343          *                                                                              - The specified index is outside the bounds of the data structure. @n
344          *                                                                              - The specified @c startIndex is either equal to or greater than the number of elements or less than @c 0. @n
345          *                                                                              - The @c count is greater than the number of elements starting from @c startIndex
346          *                                                                              or less than @c 0.
347          * @exception   E_OBJ_NOT_FOUND                 The specified @c obj is not found.
348          * @see                 LastIndexOf()
349          */
350         virtual result IndexOf(const Object& obj, int startIndex, int count, int& index) const;
351
352         /**
353          * Searches for the last occurrence of an object in this list. @n
354          * Gets the index of the object if found.
355          *
356          * @since 2.0
357          *
358          * @return              An error code
359          * @param[in]   obj         The object to locate
360          * @param[out]  index           The index of the last occurrence of the specified object
361          * @exception   E_SUCCESS                       The method is successful.
362          * @exception   E_OBJ_NOT_FOUND         The specified @c obj is not found.
363          * @see                 IndexOf()
364          */
365         virtual result LastIndexOf(const Object& obj, int& index) const;
366
367         /**
368          * Inserts the object at the specified location.
369          *
370          * @since 2.0
371          *
372          * @return              An error code
373          * @param[in]   pObj    The pointer to object to insert
374          * @param[in]   index   The index at which the object must be inserted
375          * @exception   E_SUCCESS                               The method is successful.
376          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.
377          * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
378          *                                                                              the @c index is greater than the number of elements or less than @c 0.
379          * @remarks             The elements that follow the insertion point move down to accommodate the new element.
380          *                              If the @c index equals to the number of elements, then the new element
381          *                              is added at the end of this list.
382          *                              This method performs a shallow copy. It inserts just the pointer; not the element itself.
383          * @see                 Add()
384          * @see                 RemoveAt()
385          */
386         virtual result InsertAt(Object* pObj, int index);
387
388         /**
389          * Inserts the elements of the collection at the specified location.
390          *
391          * @since 2.0
392          *
393          * @return              An error code
394          * @param[in]   collection      The collection to insert
395          * @param[in]   startIndex      The starting index at which the collection must be inserted
396          * @exception   E_SUCCESS                               The method is successful.
397          * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
398          *                                                                              the @c startIndex is greater than the number of elements or less than @c 0.
399          * @exception   E_INVALID_OPERATION             The current state of the instance prohibits the execution of the specified operation, or
400          *                                                                              the @c collection is modified during the operation of this method.
401          * @remarks             The elements that follow the insertion point move down to accommodate the new element.
402          *                              If the @c startIndex equals to the number of elements then the new elements
403          *                              are added at the end of this list.
404          *                              This method performs a shallow copy. It inserts just the pointer; not the element itself.
405          * @see                 RemoveItems()
406          * @see                 AddItems()
407          */
408         virtual result InsertItemsFrom(const ICollection& collection, int startIndex);
409
410         /**
411          * Removes the first occurrence of the specified object.
412          *
413          * @since 2.0
414          *
415          * @return              An error code
416          * @param[in]   obj                             An object to remove
417          * @exception   E_SUCCESS               The method is successful.
418          * @exception   E_OBJ_NOT_FOUND The specified @c obj is not found.
419          * @see                 Add()
420          * @see                 RemoveAt()
421          * @see                 RemoveAll()
422          */
423         virtual result Remove(const Object& obj);
424
425         /**
426          * Removes the object at the specified location.
427          *
428          * @since 2.0
429          *
430          * @return              An error code
431          * @param[in]   index                                   The index at which the object must be removed
432          * @exception   E_SUCCESS                               The method is successful.
433          * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
434          *                                                                              the specified @c index is either equal to or greater than the number of elements or less than @c 0.
435          * @remarks             The elements that follow the deletion point move up to occupy the vacated spot.
436          * @see                 InsertAt()
437          * @see                 Remove()
438          */
439         virtual result RemoveAt(int index);
440
441         /**
442          * Removes all the elements within the specified range.
443          *
444          * @since 2.0
445          *
446          * @return              An error code
447          * @param[in]   startIndex      The starting index of the range
448          * @param[in]   count           The number of elements to read
449          * @exception   E_SUCCESS                               The method is successful.
450          * @exception   E_OUT_OF_RANGE                  Either of the following conditions has occurred: @n
451          *                                                                              - The specified index is outside the bounds of the data structure. @n
452          *                                                                              - The specified @c startIndex is either equal to or greater than the number of elements or less than @c 0. @n
453          *                                                                              - The @c count is greater than the number of elements starting from @c startIndex
454          *                                                                              or less than @c 0.
455          * @remarks             The elements that follow the deletion point move up to occupy the vacated spot.
456          * @see                 AddItems()
457          */
458         virtual result RemoveItems(int startIndex, int count);
459
460         /**
461          * Removes all of the elements that are in the intersection of the specified @c collection
462          * and this list.
463          *
464          * @since 2.0
465          *
466          * @return              An error code
467          * @param[in]   collection                      The collection to remove from this list
468          * @exception   E_SUCCESS                       The method is successful.
469          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation, or
470          *                                                                      the @c collection is modified during the operation of this method.
471          * @see                 Remove()
472          * @see                 RemoveAt()
473          */
474         virtual result RemoveItems(const ICollection& collection);
475
476         /**
477          * Removes all of the object pointers in the collection and also removes all of the objects depending on the specified element deleter.
478          * The %RemoveAll() can be called before the collection is deleted.
479          *
480          * @since 2.0
481          */
482         virtual void RemoveAll(void);
483
484         /**
485          * Replaces the object at the specified @c index with the specified object.
486          *
487          * @since 2.0
488          *
489          * @return              An error code
490          * @param[in]   pObj                                    An pointer to object to set
491          * @param[in]   index                                   The index at which the object must be set
492          * @exception   E_SUCCESS                               The method is successful.
493          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.
494          * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
495          *                                                                              the specified @c index is either equal to or greater than the number of elements or less than @c 0.
496          * @see                 GetAt()
497          */
498         virtual result SetAt(Object* pObj, int index);
499
500         /**
501          * Sets the capacity of this list to the specified value.
502          *
503          * @since 2.0
504          *
505          * @return              An error code
506          * @param[in]   newCapacity     The new capacity of this list
507          * @exception   E_SUCCESS               The method is successful.
508          * @exception   E_INVALID_ARG   The specified input parameter is invalid, or
509          *                                                              the @c newCapacity is negative.
510          * @remarks             When the new capacity is less than the current capacity, the elements
511          *                              within the truncated memory are not destroyed.
512          * @see                 Construct()
513          * @see                 Trim()
514          * @see                 GetCapacity()
515          */
516         virtual result SetCapacity(int newCapacity);
517
518         /**
519          * Sorts the elements of this list using the comparer provided.
520          *
521          * @since 2.0
522          *
523          * @return              An error code
524          * @param[in]   comparer                The IComparer implementation to use when comparing elements
525          * @exception   E_SUCCESS               The method is successful.
526          * @exception   E_INVALID_ARG   The specified input parameter is invalid.
527          */
528         virtual result Sort(const IComparer& comparer);
529
530         /**
531          * Sets the capacity to the actual number of elements in this list.
532          *
533          * @since 2.0
534          */
535         virtual void Trim(void);
536
537         /**
538          * Gets the current capacity of this list.
539          *
540          * @since 2.0
541          *
542          * @return      The current capacity of this list
543          * @see                 SetCapacity()
544          */
545         virtual int GetCapacity(void) const;
546
547         /**
548          * Gets the number of objects currently stored in this list.
549          *
550          * @since 2.0
551          *
552          * @return              The number of objects currently stored in this list
553          */
554         virtual int GetCount(void) const;
555
556         /**
557          * Checks whether a list contains the specified object.
558          *
559          * @since 2.0
560          *
561          * @return              @c true if the object is present in the list, @n
562          *                              else @c false
563          * @param[in]   obj The object to locate
564          * @see                 ContainsAll()
565          */
566         virtual bool Contains(const Object& obj) const;
567
568         /**
569          * Checks whether the list contains all the elements of the specified @c collection.
570          *
571          * @since 2.0
572          *
573          * @return              @c true if the list contains all the elements of the specified @c collection, @n
574          *                              else @c false
575          * @param[in]   collection      The collection to check for in the list
576          * @exception   E_SUCCESS                       The method is successful.
577          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation, or
578          *                                                                      the @c collection is modified during the operation of this method.
579          * @remarks             The specific error code can be accessed using the GetLastResult() method.
580          * @remarks             If the given @c collection is empty, this method will return @c true.
581          * @see                 Contains()
582          */
583         virtual bool ContainsAll(const ICollection& collection) const;
584
585         /**
586          * Compares the specified Object instance with the calling %ArrayList instance.
587          *
588          * @since 2.0
589          *
590          * @return              @c true if the given object matches the calling List, @n
591          *                              else @c false
592          * @param[in]   obj The object to compare with the calling list
593          * @remarks             This method returns @c true only if the specified object @c obj is also an instance of %ArrayList class,
594          *                              both lists have the same size, and all the corresponding pairs of the elements in the two lists are equal.
595          *                              In other words, the two lists are equal if they contain the same elements in the same order.
596          */
597         virtual bool Equals(const Object& obj) const;
598
599         /**
600          * Gets the hash value of the current instance.
601          *
602          * @since 2.0
603          *
604          * @return      The hash value of the current instance
605          * @remarks     The two Tizen::Base::Object::Equals() instances must return the same hash value. For better performance, @n
606          *                      the used hash function must generate a random distribution for all inputs.
607          */
608         virtual int GetHashCode(void) const;
609
610         /**
611          * Distinguish between %ArrayList and LinkedList.
612          *
613          * @since 2.0
614          * @return      @c true if it is an %ArrayList, @n
615          *                      else @c false if it is a LinkedList
616          */
617         virtual bool IsRandomAccessible(void) const
618         {
619                 return true;
620         }
621
622         /**
623          * Gets the element deleter of the collection.
624          *
625          * @since 2.0
626          *
627          * @return      A function pointer to the existing element deleter
628          */
629         virtual DeleterFunctionType GetDeleter(void) const;
630
631 private:
632         /**
633          * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
634          *
635          * @param[in]   list    The instance of the %ArrayList class to copy from
636          */
637         ArrayList(const ArrayList& list);
638
639         /**
640          * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
641          *
642          * @param[in]   list    An instance of %ArrayList
643          */
644         ArrayList& operator =(const ArrayList& list);
645
646         /**
647          * Sorts the specified sub-list.
648          *
649          * @return              An error code
650          * @param[in]   startIndex              The starting point of the sub-list to sort
651          * @param[in]   endIndex                The end point of the sub-list to sort
652          * @exception   E_SUCCESS               The method is successful.
653          * @exception   E_INVALID_ARG   A specified input parameter is invalid, or
654          *                                                              the comparer has failed to compare the elements.
655          */
656         result QuickSort(int startIndex, int endIndex);
657
658         /**
659          * Sets the element deleter of the collection.
660          *
661          * @since 2.0
662          *
663          * @param[in]   deleter A function pointer to the element deleter to set
664          */
665         virtual void SetDeleter(DeleterFunctionType deleter);
666
667         int __capacity;
668         int __count;
669         Object** __pObjArray;
670         int __modCount;
671         IComparer* __pComparer;
672         static const int DEFAULT_CAPACITY = 10;
673         DeleterFunctionType __deleter;
674
675         friend class _ArrayListEnumerator;
676         friend class _ArrayListImpl;
677         class _ArrayListImpl* __pArrayListImpl;
678
679 }; // ArrayList
680
681 }}} // Tizen::Base::Collection
682
683 #endif // _FBASE_COL_ARRAY_LIST_H_