2 changed files with 0 additions and 1126 deletions
@ -1,70 +0,0 @@ |
|||||||
//
|
|
||||||
// Source code recreated from a .class file by IntelliJ IDEA
|
|
||||||
// (powered by FernFlower decompiler)
|
|
||||||
//
|
|
||||||
|
|
||||||
package org.springblade.common.model; |
|
||||||
|
|
||||||
import org.springframework.lang.Nullable; |
|
||||||
import org.springframework.util.CollectionUtils; |
|
||||||
|
|
||||||
import java.util.ArrayList; |
|
||||||
import java.util.Collection; |
|
||||||
import java.util.Collections; |
|
||||||
import java.util.Iterator; |
|
||||||
import java.util.LinkedList; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
class HeaderValueHolder { |
|
||||||
private final List<Object> values = new LinkedList(); |
|
||||||
|
|
||||||
HeaderValueHolder() { |
|
||||||
} |
|
||||||
|
|
||||||
void setValue(@Nullable Object value) { |
|
||||||
this.values.clear(); |
|
||||||
if (value != null) { |
|
||||||
this.values.add(value); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
void addValue(Object value) { |
|
||||||
this.values.add(value); |
|
||||||
} |
|
||||||
|
|
||||||
void addValues(Collection<?> values) { |
|
||||||
this.values.addAll(values); |
|
||||||
} |
|
||||||
|
|
||||||
void addValueArray(Object values) { |
|
||||||
CollectionUtils.mergeArrayIntoCollection(values, this.values); |
|
||||||
} |
|
||||||
|
|
||||||
List<Object> getValues() { |
|
||||||
return Collections.unmodifiableList(this.values); |
|
||||||
} |
|
||||||
|
|
||||||
List<String> getStringValues() { |
|
||||||
List<String> stringList = new ArrayList(this.values.size()); |
|
||||||
Iterator var2 = this.values.iterator(); |
|
||||||
|
|
||||||
while(var2.hasNext()) { |
|
||||||
Object value = var2.next(); |
|
||||||
stringList.add(value.toString()); |
|
||||||
} |
|
||||||
|
|
||||||
return Collections.unmodifiableList(stringList); |
|
||||||
} |
|
||||||
|
|
||||||
@Nullable |
|
||||||
Object getValue() { |
|
||||||
return !this.values.isEmpty() ? this.values.get(0) : null; |
|
||||||
} |
|
||||||
|
|
||||||
@Nullable |
|
||||||
String getStringValue() { |
|
||||||
return !this.values.isEmpty() ? String.valueOf(this.values.get(0)) : null; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
Loading…
Reference in new issue