00001 /* 00002 * ReadOnlyArrayList.hpp 00003 * 00004 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 00005 * 00006 * Oracle is a registered trademarks of Oracle Corporation and/or its 00007 * affiliates. 00008 * 00009 * This software is the confidential and proprietary information of Oracle 00010 * Corporation. You shall not disclose such confidential and proprietary 00011 * information and shall use it only in accordance with the terms of the 00012 * license agreement you entered into with Oracle. 00013 * 00014 * This notice may not be removed or altered. 00015 */ 00016 #ifndef COH_READ_ONLY_ARRAY_LIST_HPP 00017 #define COH_READ_ONLY_ARRAY_LIST_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 #include "coherence/util/Collection.hpp" 00022 #include "coherence/util/ReadOnlyMultiList.hpp" 00023 00024 COH_OPEN_NAMESPACE2(coherence,util) 00025 00026 /** 00027 * Implementation of the Collection Framework interface "List" in a read- 00028 * only fashion on top of an array data structure. 00029 * <p/> 00030 * This class also implements the Set interface, although the contents are 00031 * not checked to determine whether each element is unique. It is the 00032 * responsibility of the user to ensure that the elements are unique if the 00033 * object is used as a Set. 00034 * 00035 * @author mf 2009.08.20 00036 * @since Coherence 3.6 00037 * @see ReadOnlyMultiList 00038 */ 00039 class COH_EXPORT ReadOnlyArrayList 00040 : public class_spec<ReadOnlyArrayList, 00041 extends<ReadOnlyMultiList> > 00042 { 00043 friend class factory<ReadOnlyArrayList>; 00044 00045 // ---- constructors ---------------------------------------------------- 00046 00047 protected: 00048 /** 00049 * Construct a List from a specified number of items in an array 00050 * starting at the specified offset. 00051 * 00052 * @param vao a non-NULL array of Objects 00053 * @param of an offset of the first item in the array 00054 * @param c the number of items to use 00055 */ 00056 ReadOnlyArrayList(ObjectArray::View vao, size32_t of = 0, 00057 size32_t c = npos); 00058 private: 00059 /** 00060 * Blocked copy constructor. 00061 */ 00062 ReadOnlyArrayList(const ReadOnlyArrayList&); 00063 }; 00064 00065 COH_CLOSE_NAMESPACE2 00066 00067 #endif // COH_READ_ONLY_ARRAY_LIST_HPP