objectpool.html
来自「基于mondrian 开源框架进行OLAP多维分析」· HTML 代码 · 共 846 行 · 第 1/3 页
HTML
846 行
ObjectPool</H3><PRE>public <B>ObjectPool</B>(int initialCapacity, double minLoadFactor, double maxLoadFactor)</PRE><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="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Return the number of entries in the ObjectPool.<P><DD><DL><DT><B>Returns:</B><DD>number of entries.</DL></DD></DL><HR><A NAME="trimToSize()"><!-- --></A><H3>trimToSize</H3><PRE>public void <B>trimToSize</B>()</PRE><DL><DD>Reduce the size of the internal arrays to a size just big enough to hold the current set of entries. Generally, this should only be called after all entries have been added. Calling this causes a new, smaller array to be allocated, the objects are copied to the new array and then the old array is free to be garbage collected; there is a small time when both arrays are in memory.<P><DD><DL></DL></DD></DL><HR><A NAME="contains(java.lang.Object)"><!-- --></A><A NAME="contains(T)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="../../mondrian/util/ObjectPool.html" title="type parameter in ObjectPool">T</A> key)</PRE><DL><DD>Returns true it the Object is already in the ObjectPool and false otherwise.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - Object to test if member already or not.<DT><B>Returns:</B><DD>true is already member</DL></DD></DL><HR><A NAME="add(java.lang.Object)"><!-- --></A><A NAME="add(T)"><!-- --></A><H3>add</H3><PRE>public <A HREF="../../mondrian/util/ObjectPool.html" title="type parameter in ObjectPool">T</A> <B>add</B>(<A HREF="../../mondrian/util/ObjectPool.html" title="type parameter in ObjectPool">T</A> key)</PRE><DL><DD>Adds an object to the ObjectPool if it is not already in the pool or returns the object that is already in the pool that matches the object being added.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - Object to add to pool<DT><B>Returns:</B><DD>Equivalent object, if it exists, otherwise key</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Removes all objects from the pool but keeps the current size of the internal storage.<P><DD><DL></DL></DD></DL><HR><A NAME="iterator()"><!-- --></A><H3>iterator</H3><PRE>public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A><<A HREF="../../mondrian/util/ObjectPool.html" title="type parameter in ObjectPool">T</A>> <B>iterator</B>()</PRE><DL><DD>Returns an Iterator of this <code>ObjectPool</code>. The order of the Objects returned by the <code>Iterator</code> can not be counted on to be in the same order as they were inserted into the <code>ObjectPool</code>. The <code>Iterator</code> returned does not support the removal of <code>ObjectPool</code> members.<P><DD><DL></DL></DD></DL><HR><A NAME="chooseGrowCapacity(int, double, double)"><!-- --></A><H3>chooseGrowCapacity</H3><PRE>protected int <B>chooseGrowCapacity</B>(int size, double minLoad, double maxLoad)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="chooseHighWaterMark(int, double)"><!-- --></A><H3>chooseHighWaterMark</H3><PRE>protected final int <B>chooseHighWaterMark</B>(int capacity, double maxLoad)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="chooseLowWaterMark(int, double)"><!-- --></A><H3>chooseLowWaterMark</H3><PRE>protected final int <B>chooseLowWaterMark</B>(int capacity, double minLoad)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="nextPrime(int)"><!-- --></A><H3>nextPrime</H3><PRE>protected int <B>nextPrime</B>(int desiredCapacity)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="setUp(int, double, double)"><!-- --></A><H3>setUp</H3><PRE>protected void <B>setUp</B>(int initialCapacity, double minLoadFactor, double maxLoadFactor)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="hash(java.lang.Object)"><!-- --></A><A NAME="hash(T)"><!-- --></A><H3>hash</H3><PRE>protected int <B>hash</B>(<A HREF="../../mondrian/util/ObjectPool.html" title="type parameter in ObjectPool">T</A> key)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="equals(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="equals(T, T)"><!-- --></A><H3>equals</H3><PRE>protected boolean <B>equals</B>(<A HREF="../../mondrian/util/ObjectPool.html" title="type parameter in ObjectPool">T</A> t, <A HREF="../../mondrian/util/ObjectPool.html" title="type parameter in ObjectPool">T</A> key)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="indexOfInsertion(java.lang.Object)"><!-- --></A><A NAME="indexOfInsertion(T)"><!-- --></A><H3>indexOfInsertion</H3><PRE>protected int <B>indexOfInsertion</B>(<A HREF="../../mondrian/util/ObjectPool.html" title="type parameter in ObjectPool">T</A> key)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="rehash(int)"><!-- --></A><H3>rehash</H3><PRE>protected void <B>rehash</B>(int newCapacity)</PRE><DL><DD><DL></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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href="http://sourceforge.net/projects/mondrian"><img src="http://sourceforge.net/sflogo.php?group_id=35302&type=1" width="88" height="31" border="0" alt="SourceForge.net_Logo"></a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../mondrian/util/ObjectFactory.Singleton.html" title="class in mondrian.util"><B>PREV CLASS</B></A> <A HREF="../../mondrian/util/ObjectPoolTest.html" title="class in mondrian.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?mondrian/util/ObjectPool.html" target="_top"><B>FRAMES</B></A> <A HREF="ObjectPool.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?