blob: 84898e9524a26321527bb358851ab0353586bfea [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>FrequencySortedSet (Apache SIS 1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2019-09-20">
<meta name="keywords" content="org.apache.sis.util.collection.FrequencySortedSet class">
<meta name="keywords" content="size()">
<meta name="keywords" content="isEmpty()">
<meta name="keywords" content="add()">
<meta name="keywords" content="contains()">
<meta name="keywords" content="remove()">
<meta name="keywords" content="clear()">
<meta name="keywords" content="iterator()">
<meta name="keywords" content="headSet()">
<meta name="keywords" content="tailSet()">
<meta name="keywords" content="subSet()">
<meta name="keywords" content="first()">
<meta name="keywords" content="last()">
<meta name="keywords" content="comparator()">
<meta name="keywords" content="compare()">
<meta name="keywords" content="frequency()">
<meta name="keywords" content="frequencies()">
<meta name="keywords" content="toArray()">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FrequencySortedSet (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FrequencySortedSet.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.util.collection</a></div>
<h2 title="Class FrequencySortedSet" class="title">Class FrequencySortedSet&lt;E&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li>
<li>
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">AbstractCollection</a>&lt;E&gt;</li>
<li>
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractSet.html?is-external=true" title="class or interface in java.util" class="externalLink">AbstractSet</a>&lt;E&gt;</li>
<li>
<ul class="inheritance">
<li>FrequencySortedSet&lt;E&gt;</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>E</code> - the type of elements in the set.</dd>
</dl>
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;E&gt;</code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;E&gt;</code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;E&gt;</code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;E&gt;</code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">Sorted­Set</a>&lt;E&gt;</code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">FrequencySortedSet&lt;E&gt;</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractSet.html?is-external=true" title="class or interface in java.util" class="externalLink">AbstractSet</a>&lt;E&gt;
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">SortedSet</a>&lt;E&gt;, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;E&gt;, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></pre>
<div class="block">A set with elements ordered by the amount of time they were <a href="#add(E,int)">added</a>.
By default, less frequently added elements are first and most frequently added elements are last.
If some elements were added the same amount of time, then the iterator will traverse them in their
insertion order.
<p>An optional boolean argument in the constructor allows the construction of set in reversed order
(most frequently added elements first, less frequently added last). This is similar but not identical
to creating a default <code>Frequency­Sorted­Set</code> and iterating through it in reverse order.
The difference is that elements added the same amount of time will still be traversed in their insertion order.</p>
<p>This class is <strong>not</strong> thread-safe.
Synchronizations (if wanted) are caller responsibility.</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.8</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.sis.util.collection.FrequencySortedSet">Serialized Form</a></dd>
<p><font size="-1">Defined in the <code>sis-utility</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">FrequencySortedSet</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates an initially empty set with less frequent elements first.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(boolean)">FrequencySortedSet</a></span>&#8203;(boolean&nbsp;reversed)</code></th>
<td class="colLast">
<div class="block">Creates an initially empty set with the default initial capacity.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int,boolean)">FrequencySortedSet</a></span>&#8203;(int&nbsp;initialCapacity,
boolean&nbsp;reversed)</code></th>
<td class="colLast">
<div class="block">Creates an initially empty set with the specified initial capacity.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(E)">add</a></span>&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;element)</code></th>
<td class="colLast">
<div class="block">Adds the specified element to this set.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(E,int)">add</a></span>&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;element,
int&nbsp;occurrence)</code></th>
<td class="colLast">
<div class="block">Repetitively adds the specified element to this set.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clear()">clear</a></span>()</code></th>
<td class="colLast">
<div class="block">Removes all elements from this set.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#comparator()">comparator</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the comparator used to order the elements in this set.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compare(E,E)">compare</a></span>&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;o1,
<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;o2)</code></th>
<td class="colLast">
<div class="block">Compares the specified elements for <a href="#frequency(E)">frequency</a>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#contains(java.lang.Object)">contains</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;element)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if this set contains the specified element.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first()">first</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the first element in this set.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#frequencies()">frequencies</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the frequency of all elements in this set, in iteration order.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#frequency(E)">frequency</a></span>&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;element)</code></th>
<td class="colLast">
<div class="block">Returns the frequency of the specified element in this set.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">SortedSet</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#headSet(E)">headSet</a></span>&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;toElement)</code></th>
<td class="colLast">
<div class="block">Returns a view of the portion of this set whose elements occur with a frequency strictly less than
<code>to­Element</code> frequency.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEmpty()">isEmpty</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if this set is empty.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink">Iterator</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iterator()">iterator</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an iterator over the elements in this set in frequency order.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#last()">last</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the last element in this set.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remove(java.lang.Object)">remove</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;element)</code></th>
<td class="colLast">
<div class="block">Removes the specified element from this set, no matter how many time it has been added.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#size()">size</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of elements in this set.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">SortedSet</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subSet(E,E)">subSet</a></span>&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;fromElement,
<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;toElement)</code></th>
<td class="colLast">
<div class="block">Returns a view of the portion of this set whose elements occur with a frequency in the range of
<code>from­Element</code> frequency inclusive to <code>to­Element</code> frequency exclusive.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">SortedSet</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tailSet(E)">tailSet</a></span>&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;fromElement)</code></th>
<td class="colLast">
<div class="block">Returns a view of the portion of this set whose elements occur with a frequency equal or greater than
<code>from­Element</code> frequency.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toArray()">toArray</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the content of this set as an array.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toArray(T%5B%5D)">toArray</a></span>&#8203;(T[]&nbsp;array)</code></th>
<td class="colLast">
<div class="block">Returns the content of this set as an array.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.AbstractSet">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractSet.html?is-external=true" title="class or interface in java.util" class="externalLink">AbstractSet</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractSet.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractSet.html?is-external=true#hashCode()" title="class or interface in java.util" class="externalLink">hash­Code</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractSet.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">remove­All</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.AbstractCollection">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">AbstractCollection</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">add­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">contains­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">retain­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#toString()" title="class or interface in java.util" class="externalLink">to­String</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">get­Class</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notify­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Collection">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#parallelStream()" title="class or interface in java.util" class="externalLink">parallel­Stream</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#removeIf(java.util.function.Predicate)" title="class or interface in java.util" class="externalLink">remove­If</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#stream()" title="class or interface in java.util" class="externalLink">stream</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#toArray(java.util.function.IntFunction)" title="class or interface in java.util" class="externalLink">to­Array</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Comparator">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true#reversed()" title="class or interface in java.util" class="externalLink">reversed</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true#thenComparing(java.util.Comparator)" title="class or interface in java.util" class="externalLink">then­Comparing</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true#thenComparing(java.util.function.Function)" title="class or interface in java.util" class="externalLink">then­Comparing</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true#thenComparing(java.util.function.Function,java.util.Comparator)" title="class or interface in java.util" class="externalLink">then­Comparing</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true#thenComparingDouble(java.util.function.ToDoubleFunction)" title="class or interface in java.util" class="externalLink">then­Comparing­Double</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true#thenComparingInt(java.util.function.ToIntFunction)" title="class or interface in java.util" class="externalLink">then­Comparing­Int</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true#thenComparingLong(java.util.function.ToLongFunction)" title="class or interface in java.util" class="externalLink">then­Comparing­Long</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Iterable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#forEach(java.util.function.Consumer)" title="class or interface in java.lang" class="externalLink">for­Each</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Set">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">add­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">contains­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#hashCode()" title="class or interface in java.util" class="externalLink">hash­Code</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">remove­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">retain­All</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.SortedSet">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">SortedSet</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true#spliterator()" title="class or interface in java.util" class="externalLink">spliterator</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FrequencySortedSet</h4>
<pre>public&nbsp;FrequencySortedSet()</pre>
<div class="block">Creates an initially empty set with less frequent elements first.</div>
</li>
</ul>
<a id="&lt;init&gt;(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FrequencySortedSet</h4>
<pre>public&nbsp;FrequencySortedSet&#8203;(boolean&nbsp;reversed)</pre>
<div class="block">Creates an initially empty set with the default initial capacity.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reversed</code> - <code>true</code> if the elements should be sorted in reverse order
(most frequent element first, less frequent element last).</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(int,boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FrequencySortedSet</h4>
<pre>public&nbsp;FrequencySortedSet&#8203;(int&nbsp;initialCapacity,
boolean&nbsp;reversed)</pre>
<div class="block">Creates an initially empty set with the specified initial capacity.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>initial­Capacity</code> - the initial capacity.</dd>
<dd><code>reversed</code> - <code>true</code> if the elements should be sorted in reverse order
(most frequent element first, less frequent element last).</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="size()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;size()</pre>
<div class="block">Returns the number of elements in this set.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#size()" title="class or interface in java.util" class="externalLink">size</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#size()" title="class or interface in java.util" class="externalLink">size</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#size()" title="class or interface in java.util" class="externalLink">size</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">Abstract­Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a id="isEmpty()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEmpty</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isEmpty()</pre>
<div class="block">Returns <code>true</code> if this set is empty.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#isEmpty()" title="class or interface in java.util" class="externalLink">is­Empty</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#isEmpty()" title="class or interface in java.util" class="externalLink">is­Empty</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#isEmpty()" title="class or interface in java.util" class="externalLink">is­Empty</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">Abstract­Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a id="add(java.lang.Object,int)">
<!-- -->
</a><a id="add(E,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;add&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;element,
int&nbsp;occurrence)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Repetitively adds the specified element to this set. Returns <code>true</code> if this set changed
as a result of this operation. Changes in element order are not notified by the returned value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>element</code> - the element to add (may be <code>null</code>).</dd>
<dd><code>occurrence</code> - the number of time to add the given element. The default value is 1.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this set changed as a result of this operation.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if <code>occurrence</code> is negative.</dd>
</dl>
</li>
</ul>
<a id="add(java.lang.Object)">
<!-- -->
</a><a id="add(E)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;add&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;element)</pre>
<div class="block">Adds the specified element to this set. Returns <code>true</code> if this set changed as a result
of this operation. Changes in element order are not notified by the returned value.
<p>The default implementation delegates to <code><a href="#add(E,int)">add</a>(element, 1)</code>.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#add(E)" title="class or interface in java.util" class="externalLink">add</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#add(E)" title="class or interface in java.util" class="externalLink">add</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#add(E)" title="class or interface in java.util" class="externalLink">add</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">Abstract­Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>element</code> - the element to add (may be <code>null</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this set changed as a result of this operation.</dd>
</dl>
</li>
</ul>
<a id="contains(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;contains&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;element)</pre>
<div class="block">Returns <code>true</code> if this set contains the specified element.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util" class="externalLink">contains</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util" class="externalLink">contains</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util" class="externalLink">contains</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">Abstract­Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>element</code> - the element whose presence in this set is to be tested.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this set contains the specified element.</dd>
</dl>
</li>
</ul>
<a id="remove(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;remove&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;element)</pre>
<div class="block">Removes the specified element from this set, no matter how many time it has been added.
Returns <code>true</code> if this set changed as a result of this operation.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util" class="externalLink">remove</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util" class="externalLink">remove</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util" class="externalLink">remove</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">Abstract­Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>element</code> - the element to remove.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this set changed as a result of this operation.</dd>
</dl>
</li>
</ul>
<a id="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;clear()</pre>
<div class="block">Removes all elements from this set.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#clear()" title="class or interface in java.util" class="externalLink">clear</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#clear()" title="class or interface in java.util" class="externalLink">clear</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#clear()" title="class or interface in java.util" class="externalLink">clear</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">Abstract­Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a id="iterator()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink">Iterator</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;&nbsp;iterator()</pre>
<div class="block">Returns an iterator over the elements in this set in frequency order.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#iterator()" title="class or interface in java.util" class="externalLink">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#iterator()" title="class or interface in java.lang" class="externalLink">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#iterator()" title="class or interface in java.util" class="externalLink">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#iterator()" title="class or interface in java.util" class="externalLink">iterator</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">Abstract­Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a id="headSet(java.lang.Object)">
<!-- -->
</a><a id="headSet(E)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>headSet</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">SortedSet</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;&nbsp;headSet&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;toElement)</pre>
<div class="block">Returns a view of the portion of this set whose elements occur with a frequency strictly less than
<code>to­Element</code> frequency.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true#headSet(E)" title="class or interface in java.util" class="externalLink">head­Set</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">Sorted­Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>to­Element</code> - high endpoint (exclusive) of the returned set. May be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a view of the portion of this set delimited by the given endpoint.</dd>
</dl>
</li>
</ul>
<a id="tailSet(java.lang.Object)">
<!-- -->
</a><a id="tailSet(E)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tailSet</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">SortedSet</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;&nbsp;tailSet&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;fromElement)</pre>
<div class="block">Returns a view of the portion of this set whose elements occur with a frequency equal or greater than
<code>from­Element</code> frequency.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true#tailSet(E)" title="class or interface in java.util" class="externalLink">tail­Set</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">Sorted­Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>from­Element</code> - low endpoint (inclusive) of the returned set. May be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a view of the portion of this set delimited by the given endpoint.</dd>
</dl>
</li>
</ul>
<a id="subSet(java.lang.Object,java.lang.Object)">
<!-- -->
</a><a id="subSet(E,E)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subSet</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">SortedSet</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;&nbsp;subSet&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;fromElement,
<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;toElement)</pre>
<div class="block">Returns a view of the portion of this set whose elements occur with a frequency in the range of
<code>from­Element</code> frequency inclusive to <code>to­Element</code> frequency exclusive.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true#subSet(E,E)" title="class or interface in java.util" class="externalLink">sub­Set</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">Sorted­Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>from­Element</code> - low endpoint (inclusive) of the returned set. May be <code>null</code>.</dd>
<dd><code>to­Element</code> - high endpoint (exclusive) of the returned set. May be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a view of the portion of this set delimited by the given endpoints.</dd>
</dl>
</li>
</ul>
<a id="first()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>first</h4>
<pre class="methodSignature">public&nbsp;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;first()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/util/NoSuchElementException.html?is-external=true" title="class or interface in java.util" class="externalLink">NoSuchElementException</a></pre>
<div class="block">Returns the first element in this set.
<ul>
<li>For sets created with the default order, this is the less frequently added element.
If more than one element were added with the same frequency, this is the first one
that has been <a href="#add(E,int)">added</a> to this set at this frequency.</li>
<li>For sets created with the reverse order, this is the most frequently added element.
If more than one element were added with the same frequency, this is the first one
that has been <a href="#add(E,int)">added</a> to this set at this frequency.</li>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true#first()" title="class or interface in java.util" class="externalLink">first</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">Sorted­Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/NoSuchElementException.html?is-external=true" title="class or interface in java.util" class="externalLink">No­Such­Element­Exception</a></code> - if this set is empty.</dd>
</dl>
</li>
</ul>
<a id="last()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>last</h4>
<pre class="methodSignature">public&nbsp;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;last()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/util/NoSuchElementException.html?is-external=true" title="class or interface in java.util" class="externalLink">NoSuchElementException</a></pre>
<div class="block">Returns the last element in this set.
<ul>
<li>For sets created with the default order, this is the most frequently added element.
If more than one element were added with the same frequency, this is the last one
that has been <a href="#add(E,int)">added</a> to this set at this frequency.</li>
<li>For sets created with the reverse order, this is the less frequently added element.
If more than one element were added with the same frequency, this is the last one
that has been <a href="#add(E,int)">added</a> to this set at this frequency.</li>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true#last()" title="class or interface in java.util" class="externalLink">last</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">Sorted­Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/NoSuchElementException.html?is-external=true" title="class or interface in java.util" class="externalLink">No­Such­Element­Exception</a></code> - if this set is empty.</dd>
</dl>
</li>
</ul>
<a id="comparator()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>comparator</h4>
<pre class="methodSignature">public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;&nbsp;comparator()</pre>
<div class="block">Returns the comparator used to order the elements in this set.
For a <code>Frequency­Sorted­Set</code>, the comparator is always <code>this</code>.
<p>This method is final because the <code>Frequency­Sorted­Set</code> implementation makes
assumptions on the comparator that would not hold if this method were overridden.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true#comparator()" title="class or interface in java.util" class="externalLink">comparator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util" class="externalLink">Sorted­Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a id="compare(java.lang.Object,java.lang.Object)">
<!-- -->
</a><a id="compare(E,E)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compare</h4>
<pre class="methodSignature">public final&nbsp;int&nbsp;compare&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;o1,
<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;o2)</pre>
<div class="block">Compares the specified elements for <a href="#frequency(E)">frequency</a>. For <code>Frequency­Sorted­Set</code>
with default ordering, this method returns a positive number if <code>o1</code> has been added more frequently
to this set than <code>o2</code>, a negative number if <code>o1</code> has been added less frequently than <code>o2</code>,
and 0 otherwise. For <code>Frequency­Sorted­Set</code> with reverse ordering, this is the converse.
<p>This method is final because the <code>Frequency­Sorted­Set</code> implementation makes
assumptions on the comparator that would not hold if this method were overridden.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true#compare(T,T)" title="class or interface in java.util" class="externalLink">compare</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a id="frequency(java.lang.Object)">
<!-- -->
</a><a id="frequency(E)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>frequency</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;frequency&#8203;(<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&nbsp;element)</pre>
<div class="block">Returns the frequency of the specified element in this set.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>element</code> - the element whose frequency is to be obtained.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the frequency of the given element, or <code>0</code> if it does not occur in this set.</dd>
</dl>
</li>
</ul>
<a id="frequencies()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>frequencies</h4>
<pre class="methodSignature">public&nbsp;int[]&nbsp;frequencies()</pre>
<div class="block">Returns the frequency of all elements in this set, in iteration order.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the frequency of all elements in this set.</dd>
</dl>
</li>
</ul>
<a id="toArray()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toArray</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>[]&nbsp;toArray()</pre>
<div class="block">Returns the content of this set as an array.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#toArray()" title="class or interface in java.util" class="externalLink">to­Array</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#toArray()" title="class or interface in java.util" class="externalLink">to­Array</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#toArray()" title="class or interface in java.util" class="externalLink">to­Array</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">Abstract­Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a id="toArray(java.lang.Object[])">
<!-- -->
</a><a id="toArray(T[])">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toArray</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;T[]&nbsp;toArray&#8203;(T[]&nbsp;array)</pre>
<div class="block">Returns the content of this set as an array.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#toArray(T%5B%5D)" title="class or interface in java.util" class="externalLink">to­Array</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true#toArray(T%5B%5D)" title="class or interface in java.util" class="externalLink">to­Array</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true#toArray(T%5B%5D)" title="class or interface in java.util" class="externalLink">to­Array</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util" class="externalLink">Abstract­Collection</a>&lt;<a href="FrequencySortedSet.html" title="type parameter in FrequencySortedSet">E</a>&gt;</code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the array elements.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - the array where to copy the elements.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the elements in the given array, or in a new array
if the given array does not have a sufficient capacity.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FrequencySortedSet.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>