public final class ElementCounter
extends java.lang.Object
Constructor and Description |
---|
ElementCounter()
Creates a new instance.
|
ElementCounter(java.util.Collection<?> objects)
Creates a new instance and adds all the given objects.
|
Modifier and Type | Method and Description |
---|---|
int |
add(java.lang.Object object)
Increments the object counter for the given object by one and returns the
new object count.
|
void |
addAll(java.util.Collection<?> objects)
Increments the object counter for the given objects each by one.
|
int |
get(java.lang.Object object)
Returns the object count for the given object.
|
public ElementCounter()
public ElementCounter(java.util.Collection<?> objects)
objects
- public int add(java.lang.Object object)
object
- public void addAll(java.util.Collection<?> objects)
objects
- public int get(java.lang.Object object)
object
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.