Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean remove(Object o) {
- if(denseBag.containsKey(o)){
- if(denseBag.get(o) == 1L){
- denseBag.remove(o);
- } else {
- Long removed = denseBag.get(o);
- T theO = (T) o;
- denseBag.replace(theO, removed, removed--);
- }
- } else {
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement