2362N/A * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This abstract class implements a weak cache for a table whose data 0N/A * is obtained from a {@link List}. 0N/A * <p><b>NOTE: This class is not synchronized, subclasses must implement 0N/A * the appropriate synchronization whwn needed.</b></p> 0N/A * The index of the entry corresponding to the given <var>item</var>. 0N/A * <br>This method is called by {@link #updateCachedDatas(Object,List)}. 0N/A * The given <var>item</var> is expected to be always associated with 0N/A * @param context The context passed to 0N/A * {@link #updateCachedDatas(Object,List)}. 0N/A * @param rawDatas Raw table datas passed to 0N/A * {@link #updateCachedDatas(Object,List)}. 0N/A * @param rank Rank of the given <var>item</var> in the 0N/A * <var>rawDatas</var> list iterator. 0N/A * @param item The raw data object for which an index must be determined. 0N/A * The data for the entry corresponding to the given <var>item</var>. 0N/A * <br>This method is called by {@link #updateCachedDatas(Object,List)}. 0N/A * @param context The context passed to 0N/A * {@link #updateCachedDatas(Object,List)}. 0N/A * @param rawDatas Raw table datas passed to 0N/A * {@link #updateCachedDatas(Object,List)}. 0N/A * @param rank Rank of the given <var>item</var> in the 0N/A * <var>rawDatas</var> list iterator. 0N/A * @param item The raw data object from which the entry data must be 0N/A * @return By default <var>item</var> is returned. 0N/A * Recompute cached data. 0N/A * @param context A context object, valid during the duration of 0N/A * of the call to this method, and that will be passed to 0N/A * {@link #getIndex} and {@link #getData}. <br> 0N/A * This method is intended to be called by 0N/A * {@link #updateCachedDatas(Object)}. It is assumed that 0N/A * the context is be allocated by before this method is called, 0N/A * and released just after this method has returned.<br> 0N/A * This class does not use the context object: it is a simple 0N/A * hook for subclassed. 0N/A * @param rawDatas The table datas from which the cached data will be 0N/A * @return the computed cached data.