Package org.apache.juneau.http.part
Class BasicUriPart
java.lang.Object
org.apache.juneau.http.part.BasicPart
org.apache.juneau.http.part.BasicUriPart
- All Implemented Interfaces:
- NameValuePair,- Headerable
- 
Constructor SummaryConstructorsConstructorDescriptionBasicUriPart(String name, String value) Constructor.BasicUriPart(String name, URI value) Constructor.BasicUriPart(String name, Supplier<URI> value) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionasUri()static BasicUriPartStatic creator.static BasicUriPartStatic creator with delayed value.Return the value if present, otherwise returnother .toUri()Returns The part value as aURI.Methods inherited from class org.apache.juneau.http.part.BasicPartasHeader, assertName, assertValue, canCast, cast, getName, getRawValue, getValue, of, ofPair, toString
- 
Constructor Details- 
BasicUriPartConstructor.- Parameters:
- name- The part name. Must not be- null .
- value- The part value. Can be- null .
 
- 
BasicUriPartConstructor.- Parameters:
- name- The part name. Must not be- null .
- value- The part value supplier. Can be- null or supply- null .
 
- 
BasicUriPartConstructor.null and empty values are treated asnull . Otherwise parses usingURI.create(String).- 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 BasicUriPartobject, 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 BasicUriPartobject, ornull if the name or supplier isnull .
 
- 
asUri
- 
toUriReturns The part value as aURI.- Returns:
- The part value as a URI, ornull if the valuenull .
 
- 
orElseReturn the value if present, otherwise returnother .This is a shortened form for calling asString().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 .
 
 
-