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