File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/main/java/org/culturegraph/mf/util/tries Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ public List<P> get(final String key) {
113
113
114
114
List <P > matches = Collections .emptyList ();
115
115
for (Node <P > node : nodes ) {
116
- final List <P > values = node .getValues ();
116
+ final Set <P > values = node .getValues ();
117
117
if (!values .isEmpty ()) {
118
118
if (matches == Collections .emptyList ()) {
119
119
matches = new ArrayList <P >();
@@ -132,7 +132,7 @@ public List<P> get(final String key) {
132
132
*/
133
133
private final class Node <T > {
134
134
135
- private LinkedHashSet <T > values = new LinkedHashSet < T > ();
135
+ private Set <T > values = Collections . emptySet ();
136
136
private final CharMap <Node <T >> links = new CharMap <Node <T >>();
137
137
138
138
protected Node () {
@@ -149,14 +149,14 @@ public Node<T> addNext(final char key) {
149
149
}
150
150
151
151
public void addValue (final T value ) {
152
- if (values == Collections .emptyList ()) {
152
+ if (values == Collections .emptySet ()) {
153
153
values = new LinkedHashSet <T >();
154
154
}
155
155
this .values .add (value );
156
156
}
157
157
158
- public List <T > getValues () {
159
- return new LinkedList < T >( values ) ;
158
+ public Set <T > getValues () {
159
+ return values ;
160
160
}
161
161
162
162
public Node <T > getNext (final char key ) {
You can’t perform that action at this time.
0 commit comments