mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
6ba8df52b2
commit
051c64bc24
1 changed files with 7 additions and 6 deletions
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Sergey Prigogin (Google) - initial API and implementation
|
* Sergey Prigogin (Google) - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.pdom;
|
package org.eclipse.cdt.internal.core.pdom;
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ public class AtomicMultiSet<T> {
|
||||||
private final HashMap<T, Integer> map = new HashMap<T, Integer>();
|
private final HashMap<T, Integer> map = new HashMap<T, Integer>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds object to the set if it was not present, or increments its reference count
|
* Adds object to the set if it was not present, or increments its reference count otherwise.
|
||||||
* otherwise.
|
*
|
||||||
* @param object The object to add to the set.
|
* @param object The object to add to the set.
|
||||||
* @return Reference count of the object after the operation.
|
* @return Reference count of the object after the operation.
|
||||||
*/
|
*/
|
||||||
|
@ -38,11 +38,12 @@ public class AtomicMultiSet<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decrements reference count of the object in the set and removes the object if its
|
* Decrements reference count of the object in the set and removes the object if its reference
|
||||||
* reference count reaches zero.
|
* count reaches zero.
|
||||||
|
*
|
||||||
* @param object The object to remove from the set.
|
* @param object The object to remove from the set.
|
||||||
* @return Reference count of the object after the operation, or -1 if the object was not
|
* @return Reference count of the object after the operation, or -1 if the object was not
|
||||||
* present in the set.
|
* present in the set.
|
||||||
*/
|
*/
|
||||||
public synchronized int remove(T object) {
|
public synchronized int remove(T object) {
|
||||||
Integer count = map.remove(object);
|
Integer count = map.remove(object);
|
||||||
|
|
Loading…
Add table
Reference in a new issue