public class CountedSet<E>
extends java.lang.Object
implements java.util.Set<E>
Constructor and Description |
---|
CountedSet()
Creates a new counted set.
|
CountedSet(int size)
Creates a new counted set of the specified initial size.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
boolean |
addAll(java.util.Collection<? extends E> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
int |
getCount(E o)
Return the count of the specified object.
|
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
void |
setCount(E o,
int c)
Assigns the specified object the specified count in the set.
|
int |
size() |
void |
subtract(E o)
Reduces the count associated with this object by 1.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
void |
write(java.lang.String fileName,
int countCutoff)
Deprecated.
|
void |
write(java.lang.String fileName,
int countCutoff,
java.lang.String delim)
Deprecated.
|
void |
write(java.lang.String fileName,
int countCutoff,
java.lang.String delim,
java.lang.String encoding)
Deprecated.
|
public CountedSet()
public CountedSet(int size)
size
- The initial size of this set.public boolean add(E o)
public void subtract(E o)
o
- The object whose count is being reduced.public void setCount(E o, int c)
o
- The object to be added or updated in the set.c
- The count of the specified object.public int getCount(E o)
o
- the object whose count needs to be determined.@Deprecated public void write(java.lang.String fileName, int countCutoff)
CountedSet
.fileName
- countCutoff
- @Deprecated public void write(java.lang.String fileName, int countCutoff, java.lang.String delim)
CountedSet
.fileName
- countCutoff
- delim
- @Deprecated public void write(java.lang.String fileName, int countCutoff, java.lang.String delim, java.lang.String encoding)
CountedSet
.fileName
- countCutoff
- delim
- encoding
- public boolean addAll(java.util.Collection<? extends E> c)
public void clear()
public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean isEmpty()
public java.util.Iterator<E> iterator()
public boolean remove(java.lang.Object o)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public int size()
public java.lang.Object[] toArray()
Copyright © 2010 - 2020 Adobe. All Rights Reserved