org.aspectj.org.eclipse.jdt.internal.core.util.ICacheEnumeration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aspectjtools Show documentation
Show all versions of aspectjtools Show documentation
AspectJ tools most notably contains the AspectJ compiler (AJC). AJC applies aspects to Java classes during
compilation, fully replacing Javac for plain Java classes and also compiling native AspectJ or annotation-based
@AspectJ syntax. Furthermore, AJC can weave aspects into existing class files in a post-compile binary weaving step.
This library is a superset of AspectJ weaver and hence also of AspectJ runtime.
/*******************************************************************************
* Copyright (c) 2000, 2013 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.aspectj.org.eclipse.jdt.internal.core.util;
import java.util.Enumeration;
/**
* The ICacheEnumeration
is used to iterate over both the keys
* and values in an LRUCache. The getValue()
method returns the
* value of the last key to be retrieved using nextElement()
.
* The nextElement()
method must be called before the
* getValue()
method.
*
* The iteration can be made efficient by making use of the fact that values in
* the cache (instances of LRUCacheEntry
), know their key. For this reason,
* Hashtable lookups don't have to be made at each step of the iteration.
*
*
Modifications to the cache must not be performed while using the
* enumeration. Doing so will lead to an illegal state.
*
* @see LRUCache
*/
public interface ICacheEnumeration extends Enumeration {
/**
* Returns the value of the previously accessed key in the enumeration.
* Must be called after a call to nextElement().
*
* @return Value of current cache entry
*/
public V getValue();
}