Package org.apache.juneau.http.part
Class BasicCsvArrayPart
java.lang.Object
org.apache.juneau.http.part.BasicPart
org.apache.juneau.http.part.BasicCsvArrayPart
- All Implemented Interfaces:
- NameValuePair,- Headerable
A 
NameValuePair that consists of a comma-delimited list of string values.
 See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionBasicCsvArrayPart(String name, String value) Constructor.BasicCsvArrayPart(String name, String... value) Constructor.BasicCsvArrayPart(String name, Supplier<String[]> value) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionasArray()Returns The part value as an array wrapped in anOptional.asList()Provides the ability to perform fluent-style assertions on this part.booleanReturnstrue if this part contains the specified value.booleancontainsIgnoreCase(String val) Returnstrue if this part contains the specified value usingString.equalsIgnoreCase(String).getValue()static BasicCsvArrayPartStatic creator.static BasicCsvArrayPartStatic creator with delayed value.String[]Return the value if present, otherwise returnother .String[]toArray()Returns The part value as an array.toList()Returns The part value as aList.Methods inherited from class org.apache.juneau.http.part.BasicPartasHeader, assertName, assertValue, canCast, cast, getName, getRawValue, of, ofPair, toString
- 
Constructor Details- 
BasicCsvArrayPartConstructor.- Parameters:
- name- The part name. Must not be- null .
- value- The part value. Can be- null .
 
- 
BasicCsvArrayPartConstructor.- Parameters:
- name- The part name. Must not be- null .
- value- The part value supplier. Can be- null or supply- null .
 
- 
BasicCsvArrayPartConstructor.null values are treated asnull . Otherwise parses as a comma-delimited list with whitespace trimmed.- Parameters:
- name- The part name. Must not be- null .
- value- The part value. Can be- null .
 
 
- 
- 
Method Details- 
ofStatic creator.- Parameters:
- name- The part name.
- value- The part value.
- Returns:
- A new BasicCsvArrayPartobject, ornull if the name or value isnull .
 
- 
ofStatic creator with delayed value.Part value is re-evaluated on each call to NameValuePair.getValue().- Parameters:
- name- The part name.
- value- The part value supplier.
- Returns:
- A new BasicCsvArrayPartobject, ornull if the name or supplier isnull .
 
- 
getValue- Specified by:
- getValuein interface- NameValuePair
- Overrides:
- getValuein class- BasicPart
 
- 
containsReturnstrue if this part contains the specified value.- Parameters:
- val- The value to check for.
- Returns:
- true if this part contains the specified value.
 
- 
containsIgnoreCaseReturnstrue if this part contains the specified value usingString.equalsIgnoreCase(String).- Parameters:
- val- The value to check for.
- Returns:
- true if this part contains the specified value.
 
- 
assertListProvides the ability to perform fluent-style assertions on this part.- Returns:
- A new fluent assertion object.
- Throws:
- AssertionError- If assertion failed.
 
- 
toListReturns The part value as aList.The list is unmodifiable. - Returns:
- The part value as a List, ornull if the valuenull .
 
- 
asList
- 
toArrayReturns The part value as an array.The array is a copy of the value of this part. - Returns:
- The part value as an array, or null if the valuenull .
 
- 
asArrayReturns The part value as an array wrapped in anOptional.Array is a copy of the value of this part. - Returns:
- The part value as an array wrapped in an Optional. Nevernull .
 
- 
orElseReturn the value if present, otherwise returnother .This is a shortened form for calling asArray().orElse( .other )- Parameters:
- other- The value to be returned if there is no value present, can be- null .
- Returns:
- The value, if present, otherwise other .
 
 
-