Constructor and Description |
---|
ManBindingsExt() |
Modifier and Type | Method and Description |
---|---|
static manifold.rt.api.Bindings |
deepCopy(manifold.rt.api.Bindings thiz)
Provide a deep copy of this
Bindings using a DataBindings for the copy. |
static <E extends manifold.rt.api.Bindings> |
deepCopy(manifold.rt.api.Bindings thiz,
Function<Integer,E> bindingsSupplier)
Provide a deep copy of this
Bindings . |
static <E extends Map<String,Object>> |
deepCopyValue(Object value,
Function<Integer,E> bindingsSupplier) |
static String |
listToJson(List list)
Serializes a JSON-compatible List into a JSON formatted StringBuilder with the specified indent of spaces.
|
static void |
listToJson(StringBuilder target,
int indent,
List value)
|
static URL |
makeUrl(manifold.rt.api.Bindings thiz,
String url)
Make a JSON-compatible URL with the arguments from this
Bindings . |
static Object |
sendJsonRequest(manifold.rt.api.Bindings thiz,
String httpMethod,
String url)
Use HTTP GET, POST, PUT, PATCH, or DELETE to send this
Bindings to a URL with a JSON response. |
static Object |
sendYamlRequest(manifold.rt.api.Bindings thiz,
String httpMethod,
String url)
Use HTTP GET, POST, PUT, PATCH, or DELETE to send this
Bindings to a URL with a YAML response. |
static String |
toCsv(manifold.rt.api.Bindings thiz)
Serializes this
Bindings instance to CSV nested in a root element named "object" |
static String |
toCsv(manifold.rt.api.Bindings thiz,
String name)
Serializes this
Bindings instance to CSV with in a root element with the specified name |
static void |
toCsv(manifold.rt.api.Bindings thiz,
String name,
StringBuilder target,
int indent)
Serializes this
Bindings instance into an CSV formatted StringBuilder target
with the specified indent of spaces. |
static String |
toJson(manifold.rt.api.Bindings thiz)
Serializes this
Bindings instance to a JSON formatted String |
static void |
toJson(manifold.rt.api.Bindings thiz,
StringBuilder target,
int margin)
Serializes this
Bindings instance into a JSON formatted StringBuilder target
with the specified indent of spaces. |
static String |
toXml(manifold.rt.api.Bindings thiz)
Serializes this
Bindings instance to XML nested in a root element named "object" |
static String |
toXml(manifold.rt.api.Bindings thiz,
String name)
Serializes this
Bindings instance to XML with in a root element with the specified name |
static void |
toXml(manifold.rt.api.Bindings thiz,
String name,
StringBuilder target,
int indent)
Serializes this
Bindings instance into an XML formatted StringBuilder target
with the specified indent of spaces. |
static String |
toYaml(manifold.rt.api.Bindings thiz)
Serializes this
Bindings instance to a YAML formatted String |
static void |
toYaml(manifold.rt.api.Bindings thiz,
StringBuilder target)
Serializes this
Bindings instance into a YAML 1.2 formatted StringBuilder target
with the specified indent of spaces. |
public static String toJson(manifold.rt.api.Bindings thiz)
Bindings
instance to a JSON formatted StringBindings
instance serialized to a JSON formatted Stringpublic static String toYaml(manifold.rt.api.Bindings thiz)
Bindings
instance to a YAML formatted StringBindings
instance serialized to a YAML formatted Stringpublic static void toJson(manifold.rt.api.Bindings thiz, StringBuilder target, int margin)
Bindings
instance into a JSON formatted StringBuilder target
with the specified indent
of spaces.target
- A StringBuilder
to write the JSON inmargin
- The margin of spaces to indent the resulting block of JSONpublic static void toYaml(manifold.rt.api.Bindings thiz, StringBuilder target)
Bindings
instance into a YAML 1.2 formatted StringBuilder target
with the specified indent
of spaces.target
- A StringBuilder
to write the YAML inpublic static void listToJson(StringBuilder target, int indent, List value)
List
composed of JSON values, where a JSON value is one of:
target
- A StringBuilder
to write the JSON inindent
- The margin of spaces to indent the JSONvalue
- A List
composed of JSON values to serializepublic static String listToJson(List list)
listToJson(StringBuilder, int, List)
with no indentation and returns a String.public static String toXml(manifold.rt.api.Bindings thiz)
Bindings
instance to XML nested in a root element named "object"
public static String toXml(manifold.rt.api.Bindings thiz, String name)
Bindings
instance to XML with in a root element with the specified name
name
- The name of the root element to nest the Bindings XMLtoXml(Bindings, String, StringBuilder, int)
public static void toXml(manifold.rt.api.Bindings thiz, String name, StringBuilder target, int indent)
Bindings
instance into an XML formatted StringBuilder target
with the specified indent
of spaces.name
- The name of the root element to nest the Bindings XMLtarget
- A StringBuilder
to write the XML inindent
- The margin of spaces to indent the XMLpublic static String toCsv(manifold.rt.api.Bindings thiz)
Bindings
instance to CSV nested in a root element named "object"
public static String toCsv(manifold.rt.api.Bindings thiz, String name)
Bindings
instance to CSV with in a root element with the specified name
name
- The name of the root element to nest the Bindings CSVtoCsv(Bindings, String, StringBuilder, int)
public static void toCsv(manifold.rt.api.Bindings thiz, String name, StringBuilder target, int indent)
Bindings
instance into an CSV formatted StringBuilder target
with the specified indent
of spaces.name
- The name of the root element to nest the Bindings CSVtarget
- A StringBuilder
to write the CSV inindent
- The margin of spaces to indent the CSVpublic static URL makeUrl(manifold.rt.api.Bindings thiz, String url)
public static Object sendJsonRequest(manifold.rt.api.Bindings thiz, String httpMethod, String url)
Bindings
to a URL with a JSON response.httpMethod
- HTTP method to use: "GET", "POST", "PUT", "PATCH", or "DELETE"url
- The URL to send this Bindings toManUrlExt.sendJsonRequest(URL, String, Object)
public static Object sendYamlRequest(manifold.rt.api.Bindings thiz, String httpMethod, String url)
Bindings
to a URL with a YAML response.httpMethod
- HTTP method to use: "GET", "POST", "PUT", "PATCH", or "DELETE"url
- The URL to send this Bindings toManUrlExt.sendYamlRequest(URL, String, Object)
public static manifold.rt.api.Bindings deepCopy(manifold.rt.api.Bindings thiz)
Bindings
using a DataBindings
for the copy.
Same as invoking: deepCopy(DataBindings::new)
Bindings
public static <E extends manifold.rt.api.Bindings> E deepCopy(manifold.rt.api.Bindings thiz, Function<Integer,E> bindingsSupplier)
Bindings
. Note this method assumes the Bindings is limited to a JSON
style Bindings<String, Value>
where Value
type is strictly:
String
, Number
, or Boolean
List
of Value
Bindings
of String
to Value
bindingsSupplier
- Creates the Bindings
instance used for the copy and instances for nested Bindings
.Bindings
Copyright © 2024. All rights reserved.