OptionsImpl.java
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Decompiled with CFR 0_118.
*/
package com.day.cq.mcm.campaign.profile.impl;
import com.day.cq.mcm.campaign.profile.OptionValue;
import com.day.cq.mcm.campaign.profile.Options;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@Deprecated
public final class OptionsImpl
implements Options {
private final List<OptionValue> values = new ArrayList<OptionValue>(4);
protected OptionsImpl() {
}
protected void addValue(OptionValue value) {
this.values.add(value);
}
@Override
public Iterator<OptionValue> getValues() {
return this.values.iterator();
}
public String toString() {
StringBuilder strRep = new StringBuilder(32);
boolean isFirst = true;
for (OptionValue value : this.values) {
if (isFirst) {
isFirst = false;
} else {
strRep.append("; ");
}
strRep.append(value.getValue()).append(':').append(value.getLabel());
}
return strRep.toString();
}
}