blob: 5d23d1f8e5c883c7f22b8f988d513d45145a321c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
LRUMap (Apache Axis)
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="LRUMap (Apache Axis)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LRUMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html" title="class in org.apache.axis.collections"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/axis/collections/LRUMap.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="LRUMap.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.axis.collections</FONT>
<BR>
Class LRUMap</H2>
<PRE>
<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html" title="class in org.apache.axis.collections">org.apache.axis.collections.SequencedHashMap</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.axis.collections.LRUMap</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/Externalizable.html?is-external=true" title="class or interface in java.io">Externalizable</A>, <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</A>, <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>LRUMap</B><DT>extends <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html" title="class in org.apache.axis.collections">SequencedHashMap</A><DT>implements <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/Externalizable.html?is-external=true" title="class or interface in java.io">Externalizable</A></DL>
</PRE>
<P>
<p>
An implementation of a Map which has a maximum size and uses a Least Recently Used
algorithm to remove items from the Map when the maximum size is reached and new items are added.
</p>
<p>
A synchronized version can be obtained with:
<code>Collections.synchronizedMap( theMapToSynchronize )</code>
If it will be accessed by multiple threads, you _must_ synchronize access
to this Map. Even concurrent get(Object) operations produce indeterminate
behaviour.
</p>
<p>
Unlike the Collections 1.0 version, this version of LRUMap does use a true
LRU algorithm. The keys for all gets and puts are moved to the front of
the list. LRUMap is now a subclass of SequencedHashMap, and the "LRU"
key is now equivalent to LRUMap.getFirst().
</p>
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>Commons Collections 1.0</DD>
<DT><B>Author:</B></DT>
<DD><a href="mailto:jstrachan@apache.org">James Strachan</a>, <a href="mailto:morgand@apache.org">Morgan Delagrange</a></DD>
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#org.apache.axis.collections.LRUMap">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#LRUMap()">LRUMap</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor, primarily for the purpose of
de-externalization.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#LRUMap(int)">LRUMap</A></B>(int&nbsp;i)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new LRUMap with a maximum capacity of <i>i</i>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#get(java.lang.Object)">get</A></B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the value for a key from the Map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#getMaximumSize()">getMaximumSize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Getter for property maximumSize.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#processRemovedLRU(java.lang.Object, java.lang.Object)">processRemovedLRU</A></B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key,
<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subclasses of LRUMap may hook into this method to
provide specialized actions whenever an Object is
automatically removed from the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#put(java.lang.Object, java.lang.Object)">put</A></B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key,
<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the key and its Object from the Map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#readExternal(java.io.ObjectInput)">readExternal</A></B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/ObjectInput.html?is-external=true" title="class or interface in java.io">ObjectInput</A>&nbsp;in)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deserializes this map from the given stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#removeLRU()">removeLRU</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is used internally by the class for
finding and removing the LRU Object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#setMaximumSize(int)">setMaximumSize</A></B>(int&nbsp;maximumSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Setter for property maximumSize.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/collections/LRUMap.html#writeExternal(java.io.ObjectOutput)">writeExternal</A></B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/ObjectOutput.html?is-external=true" title="class or interface in java.io">ObjectOutput</A>&nbsp;out)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes this map to the given stream.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.axis.collections.SequencedHashMap"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.axis.collections.<A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html" title="class in org.apache.axis.collections">SequencedHashMap</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#clear()">clear</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#clone()">clone</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#containsKey(java.lang.Object)">containsKey</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#containsValue(java.lang.Object)">containsValue</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#entrySet()">entrySet</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#get(int)">get</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#getFirst()">getFirst</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#getFirstKey()">getFirstKey</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#getFirstValue()">getFirstValue</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#getLast()">getLast</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#getLastKey()">getLastKey</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#getLastValue()">getLastValue</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#getValue(int)">getValue</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#hashCode()">hashCode</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#indexOf(java.lang.Object)">indexOf</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#isEmpty()">isEmpty</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#iterator()">iterator</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#keySet()">keySet</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#lastIndexOf(java.lang.Object)">lastIndexOf</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#putAll(java.util.Map)">putAll</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#remove(int)">remove</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#remove(java.lang.Object)">remove</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#sequence()">sequence</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#size()">size</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#toString()">toString</A>, <A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#values()">values</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="LRUMap()"><!-- --></A><H3>
LRUMap</H3>
<PRE>
public <B>LRUMap</B>()</PRE>
<DL>
<DD>Default constructor, primarily for the purpose of
de-externalization. This constructors sets a default
LRU limit of 100 keys, but this value may be overridden
internally as a result of de-externalization.
<P>
</DL>
<HR>
<A NAME="LRUMap(int)"><!-- --></A><H3>
LRUMap</H3>
<PRE>
public <B>LRUMap</B>(int&nbsp;i)</PRE>
<DL>
<DD>Create a new LRUMap with a maximum capacity of <i>i</i>.
Once <i>i</i> capacity is achieved, subsequent gets
and puts will push keys out of the map. See .
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - Maximum capacity of the LRUMap</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="get(java.lang.Object)"><!-- --></A><H3>
get</H3>
<PRE>
public <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>get</B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key)</PRE>
<DL>
<DD><p>Get the value for a key from the Map. The key
will be promoted to the Most Recently Used position.
Note that get(Object) operations will modify
the underlying Collection. Calling get(Object)
inside of an iteration over keys, values, etc. is
currently unsupported.</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/Map.html?is-external=true#get(java.lang.Object)" title="class or interface in java.util">get</A></CODE> in interface <CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#get(java.lang.Object)">get</A></CODE> in class <CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html" title="class in org.apache.axis.collections">SequencedHashMap</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - Key to retrieve
<DT><B>Returns:</B><DD>Returns the value. Returns null if the key has a
null value <i>or</i> if the key has no value.</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>put</B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key,
<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</PRE>
<DL>
<DD><p>Removes the key and its Object from the Map.</p>
<p>(Note: this may result in the "Least Recently Used"
object being removed from the Map. In that case,
the removeLRU() method is called. See javadoc for
removeLRU() for more details.)</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/Map.html?is-external=true#put(java.lang.Object, java.lang.Object)" title="class or interface in java.util">put</A></CODE> in interface <CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#put(java.lang.Object, java.lang.Object)">put</A></CODE> in class <CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html" title="class in org.apache.axis.collections">SequencedHashMap</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - Key of the Object to add.<DD><CODE>value</CODE> - Object to add
<DT><B>Returns:</B><DD>Former value of the key</DL>
</DD>
</DL>
<HR>
<A NAME="removeLRU()"><!-- --></A><H3>
removeLRU</H3>
<PRE>
protected void <B>removeLRU</B>()</PRE>
<DL>
<DD>This method is used internally by the class for
finding and removing the LRU Object.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="processRemovedLRU(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
processRemovedLRU</H3>
<PRE>
protected void <B>processRemovedLRU</B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key,
<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</PRE>
<DL>
<DD>Subclasses of LRUMap may hook into this method to
provide specialized actions whenever an Object is
automatically removed from the cache. By default,
this method does nothing.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key that was removed<DD><CODE>value</CODE> - value of that key (can be null)</DL>
</DD>
</DL>
<HR>
<A NAME="readExternal(java.io.ObjectInput)"><!-- --></A><H3>
readExternal</H3>
<PRE>
public void <B>readExternal</B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/ObjectInput.html?is-external=true" title="class or interface in java.io">ObjectInput</A>&nbsp;in)
throws <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>,
<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</A></PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#readExternal(java.io.ObjectInput)">SequencedHashMap</A></CODE></B></DD>
<DD>Deserializes this map from the given stream.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/Externalizable.html?is-external=true#readExternal(java.io.ObjectInput)" title="class or interface in java.io">readExternal</A></CODE> in interface <CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/Externalizable.html?is-external=true" title="class or interface in java.io">Externalizable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#readExternal(java.io.ObjectInput)">readExternal</A></CODE> in class <CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html" title="class in org.apache.axis.collections">SequencedHashMap</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the stream to deserialize from
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if the stream raises it
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</A></CODE> - if the stream raises it</DL>
</DD>
</DL>
<HR>
<A NAME="writeExternal(java.io.ObjectOutput)"><!-- --></A><H3>
writeExternal</H3>
<PRE>
public void <B>writeExternal</B>(<A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/ObjectOutput.html?is-external=true" title="class or interface in java.io">ObjectOutput</A>&nbsp;out)
throws <A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#writeExternal(java.io.ObjectOutput)">SequencedHashMap</A></CODE></B></DD>
<DD>Serializes this map to the given stream.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/Externalizable.html?is-external=true#writeExternal(java.io.ObjectOutput)" title="class or interface in java.io">writeExternal</A></CODE> in interface <CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/Externalizable.html?is-external=true" title="class or interface in java.io">Externalizable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html#writeExternal(java.io.ObjectOutput)">writeExternal</A></CODE> in class <CODE><A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html" title="class in org.apache.axis.collections">SequencedHashMap</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the stream to serialize to
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if the stream raises it</DL>
</DD>
</DL>
<HR>
<A NAME="getMaximumSize()"><!-- --></A><H3>
getMaximumSize</H3>
<PRE>
public int <B>getMaximumSize</B>()</PRE>
<DL>
<DD>Getter for property maximumSize.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Value of property maximumSize.</DL>
</DD>
</DL>
<HR>
<A NAME="setMaximumSize(int)"><!-- --></A><H3>
setMaximumSize</H3>
<PRE>
public void <B>setMaximumSize</B>(int&nbsp;maximumSize)</PRE>
<DL>
<DD>Setter for property maximumSize.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>maximumSize</CODE> - New value of property maximumSize.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LRUMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../org/apache/axis/collections/SequencedHashMap.html" title="class in org.apache.axis.collections"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/axis/collections/LRUMap.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="LRUMap.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>