1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.collections4.multiset;
18
19 import java.util.Set;
20
21 import org.apache.commons.collections4.MultiSet;
22 import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
23
24
25
26
27
28
29
30
31
32
33 public abstract class AbstractMultiSetDecorator<E>
34 extends AbstractCollectionDecorator<E> implements MultiSet<E> {
35
36
37 private static final long serialVersionUID = 20150610L;
38
39
40
41
42 protected AbstractMultiSetDecorator() {
43 }
44
45
46
47
48
49
50
51 protected AbstractMultiSetDecorator(final MultiSet<E> multiset) {
52 super(multiset);
53 }
54
55 @Override
56 public int add(final E object, final int count) {
57 return decorated().add(object, count);
58 }
59
60
61
62
63
64
65 @Override
66 protected MultiSet<E> decorated() {
67 return (MultiSet<E>) super.decorated();
68 }
69
70 @Override
71 public Set<Entry<E>> entrySet() {
72 return decorated().entrySet();
73 }
74
75 @Override
76 public boolean equals(final Object object) {
77 return object == this || decorated().equals(object);
78 }
79
80 @Override
81 public int getCount(final Object object) {
82 return decorated().getCount(object);
83 }
84
85 @Override
86 public int hashCode() {
87 return decorated().hashCode();
88 }
89
90 @Override
91 public int remove(final Object object, final int count) {
92 return decorated().remove(object, count);
93 }
94
95 @Override
96 public int setCount(final E object, final int count) {
97 return decorated().setCount(object, count);
98 }
99
100 @Override
101 public Set<E> uniqueSet() {
102 return decorated().uniqueSet();
103 }
104
105 }