public class Jive extends Object
stream(ArrayNode) function which
allows a user to begin working with the Stream interface against their
JSON values.| Modifier and Type | Method and Description |
|---|---|
static com.fasterxml.jackson.databind.node.ArrayNode |
concat(com.fasterxml.jackson.databind.node.ArrayNode... nodes)
Concatenates multiple ArrayNode instances.
|
static boolean |
contains(com.fasterxml.jackson.databind.node.ArrayNode node,
com.fasterxml.jackson.databind.JsonNode value)
Determines whether a JsonNode exists in an ArrayNode.
|
static boolean |
contains(com.fasterxml.jackson.databind.node.ObjectNode node,
com.fasterxml.jackson.databind.JsonNode value)
Determines whether a JsonNode exists in an ObjectNode as
a value entry.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
drop(com.fasterxml.jackson.databind.node.ArrayNode node,
int count)
Returns a new ArrayNode with the first N items removed.
|
static boolean |
every(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
Determines whether all JsonNodes within an ArrayNode fit
a provided Predicate condition.
|
static boolean |
every(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
Determines whether all entries within an ObjectNode fit
a provided Predicate condition.
|
static <T> Optional<T> |
execute(Callable<T> execution)
Executes a scoped function with caught Exceptions.
|
static <T> Optional<T> |
execute(com.fasterxml.jackson.databind.ObjectMapper mapper,
SafeExecution<T> execution)
Executes a scoped function with the provided ObjectMapper.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
filter(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
Filters values in an ArrayNode into a new ArrayNode.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
filter(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
Filters values in an ObjectNode into a new ObjectNode.
|
static Optional<com.fasterxml.jackson.databind.JsonNode> |
find(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
Attempts to find an ArrayNode value matching a criteria.
|
static Optional<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> |
find(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
Attempts to find an ObjectNode entry matching a criteria.
|
static Set<String> |
keys(com.fasterxml.jackson.databind.node.ObjectNode node)
Returns an Set of Strings instance containing all keys of
the provided ObjectNode.
|
static com.fasterxml.jackson.databind.JsonNode |
last(com.fasterxml.jackson.databind.node.ArrayNode node)
Retrieves the last value in an ArrayNode.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
map(com.fasterxml.jackson.databind.node.ArrayNode node,
Function<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.JsonNode> function)
Maps values in an ArrayNode into a new ArrayNode.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
map(com.fasterxml.jackson.databind.node.ObjectNode node,
Function<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>,Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> function)
Maps entries in an ObjectNode into a new ObjectNode.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
merge(com.fasterxml.jackson.databind.node.ObjectNode... nodes)
Performs a shallow merge of multiple ObjectNodes.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
newArrayNode()
Constructs a new Jackson ArrayNode instance.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
newArrayNode(com.fasterxml.jackson.databind.JsonNode... nodes)
Constructs a new Jackson ArrayNode instance.
|
static com.fasterxml.jackson.databind.node.BigIntegerNode |
newBigIntegerNode(BigInteger value)
Constructs a new BigIntegerNode from a BigDecimal value.
|
static com.fasterxml.jackson.databind.node.BinaryNode |
newBinaryNode(byte[] value)
Constructs a new BinaryNode from a byte[] value.
|
static com.fasterxml.jackson.databind.node.BooleanNode |
newBooleanNode(Boolean value)
Constructs a new BooleanNode from a Boolean value.
|
static com.fasterxml.jackson.databind.node.DecimalNode |
newDecimalNode(BigDecimal value)
Constructs a new DecimalNode from a BigDecimal value.
|
static com.fasterxml.jackson.databind.node.DoubleNode |
newDoubleNode(Double value)
Constructs a new DoubleNode from a Double value.
|
static com.fasterxml.jackson.databind.node.FloatNode |
newFloatNode(Float value)
Constructs a new FloatNode from a Float value.
|
static com.fasterxml.jackson.databind.node.IntNode |
newIntNode(Integer value)
Constructs a new IntNode from an Integer value.
|
static Iterable<com.fasterxml.jackson.databind.JsonNode> |
newIterable(com.fasterxml.jackson.databind.JsonNode node)
Constructs a new Iterable of type JsonNode using the provided
input.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
BigDecimal value)
Constructs a new JSON Map.Entry from a BigDecimal value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
BigInteger value)
Constructs a new JSON Map.Entry from a BigInteger value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
Boolean value)
Constructs a new JSON Map.Entry from a Boolean value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
byte[] value)
Constructs a new JSON Map.Entry from a byte[] value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
Double value)
Constructs a new JSON Map.Entry from a Double value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
Float value)
Constructs a new JSON Map.Entry from a Float value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
Integer value)
Constructs a new JSON Map.Entry from an Integer value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
com.fasterxml.jackson.databind.JsonNode value)
Constructs a new JSON Map.Entry from a JsonNode value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
Long value)
Constructs a new JSON Map.Entry from a Long value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
Object value)
Constructs a new JSON Map.Entry from an Object value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
Short value)
Constructs a new JSON Map.Entry from a Short value.
|
static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> |
newJsonEntry(String key,
String value)
Constructs a new JSON Map.Entry from a String value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(BigDecimal value)
Constructs a new JsonNode from a BigDecimal value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(BigInteger value)
Constructs a new JsonNode from a BigInteger value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(Boolean value)
Constructs a new JsonNode from a Boolean value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(byte[] value)
Constructs a new JsonNode from a byte[] value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(Double value)
Constructs a new JsonNode from a Double value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(Float value)
Constructs a new JsonNode from a Float value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(Integer value)
Constructs a new JsonNode from an Integer value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(Long value)
Constructs a new JsonNode from a Long value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(Object value)
Constructs a new JsonNode from an Object value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(Short value)
Constructs a new JsonNode from a Short value.
|
static com.fasterxml.jackson.databind.JsonNode |
newJsonNode(String value)
Constructs a new JsonNode from a String value.
|
static com.fasterxml.jackson.databind.node.LongNode |
newLongNode(Long value)
Constructs a new LongNode from a Long value.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
newObjectNode()
Constructs a new Jackson ObjectNode instance.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
newObjectNode(Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>... entries)
Constructs a new Jackson ObjectNode instance.
|
static com.fasterxml.jackson.databind.node.POJONode |
newPojoNode(Object value)
Constructs a new POJONode from an Object value.
|
static com.fasterxml.jackson.databind.node.ShortNode |
newShortNode(Short value)
Constructs a new ShortNode from a Short value.
|
static com.fasterxml.jackson.databind.node.TextNode |
newTextNode(String value)
Constructs a new TextNode from a String value.
|
static boolean |
none(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
Returns true if no values in the ArrayNode match the
provided predicate.
|
static boolean |
none(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
Returns true if no entries in the ObjectNode match the
provided predicate.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
omit(com.fasterxml.jackson.databind.node.ObjectNode node,
Collection<String> keys)
Returns an ObjectNode instance without the provided list
of keys using the provided ObjectNode instance.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
omit(com.fasterxml.jackson.databind.node.ObjectNode node,
String... keys)
Returns an ObjectNode instance without the provided list
of keys using the provided ObjectNode instance.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
pick(com.fasterxml.jackson.databind.node.ObjectNode node,
Collection<String> keys)
Returns an ObjectNode instance created from the provided Set
of keys using the provided ObjectNode instance.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
pick(com.fasterxml.jackson.databind.node.ObjectNode node,
String... keys)
Returns an ObjectNode instance created from the provided list
of keys using the provided ObjectNode instance.
|
static <T> T |
reduce(com.fasterxml.jackson.databind.node.ArrayNode node,
T initial,
BiFunction<T,com.fasterxml.jackson.databind.JsonNode,T> function)
Reduces an ArrayNode into a single value of type T using
the provided function to accumulate values.
|
static <T> T |
reduce(com.fasterxml.jackson.databind.node.ObjectNode node,
T initial,
BiFunction<T,Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>,T> function)
Reduces an ObjectNode into a single value of type T using
the provided function to accumulate values.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
reject(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
Filters values in an ArrayNode into a new ArrayNode.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
reject(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
Filters values in an ObjectNode into a new ObjectNode.
|
static boolean |
some(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
Returns true if some values in the ArrayNode match the
provided predicate.
|
static boolean |
some(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
Returns true if some entries in the ObjectNode match the
provided predicate.
|
static Stream<com.fasterxml.jackson.databind.JsonNode> |
stream(com.fasterxml.jackson.databind.node.ArrayNode node)
Creates a new Stream from the provided ArrayNode.
|
static Stream<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> |
stream(com.fasterxml.jackson.databind.node.ObjectNode node)
Creates a new Stream from the provided ObjectNode.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
take(com.fasterxml.jackson.databind.node.ArrayNode node,
int count)
Returns a new ArrayNode containing N taken items from a provided
ArrayNode instance.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
transform(com.fasterxml.jackson.databind.node.ArrayNode node,
Function<Stream<com.fasterxml.jackson.databind.JsonNode>,Stream<com.fasterxml.jackson.databind.JsonNode>> transformer)
Transforms a provided ArrayNode into a new ArrayNode instance.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
transform(com.fasterxml.jackson.databind.node.ObjectNode node,
Function<Stream<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>>,Stream<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>>> transformer)
Transforms a provided ObjectNode into a new ObjectNode instance.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
uniq(com.fasterxml.jackson.databind.node.ArrayNode node)
Returns an ArrayNode instance with all duplicate values
removed.
|
static com.fasterxml.jackson.databind.node.ArrayNode |
values(com.fasterxml.jackson.databind.node.ObjectNode node)
Returns an ArrayNode instance containing all values of
the provided ObjectNode.
|
public static com.fasterxml.jackson.databind.node.ArrayNode concat(com.fasterxml.jackson.databind.node.ArrayNode... nodes)
nodes - the ArrayNode instances to concatenate.public static boolean contains(com.fasterxml.jackson.databind.node.ArrayNode node,
com.fasterxml.jackson.databind.JsonNode value)
node - the ArrayNode to search within.value - the JsonNode value to search for.public static boolean contains(com.fasterxml.jackson.databind.node.ObjectNode node,
com.fasterxml.jackson.databind.JsonNode value)
node - the ObjectNode to search within.value - the JsonNode value to search for.public static com.fasterxml.jackson.databind.node.ArrayNode drop(com.fasterxml.jackson.databind.node.ArrayNode node,
int count)
node - the node to drop from.count - the number of nodes to drop.public static <T> Optional<T> execute(Callable<T> execution)
T - the type of the block return value.execution - the execution implementation to call.public static <T> Optional<T> execute(com.fasterxml.jackson.databind.ObjectMapper mapper, SafeExecution<T> execution)
T - the type of the block return value.mapper - the ObjectMapper instance to execute with.execution - the execution implementation to call.public static boolean every(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
node - the ArrayNode to iterate through.predicate - the condition to verify matches against.public static boolean every(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
node - the ObjectNode to iterate through.predicate - the condition to verify matches against.public static com.fasterxml.jackson.databind.node.ArrayNode filter(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
node - the ArrayNode to filter through.predicate - the condition used to filter values.public static com.fasterxml.jackson.databind.node.ObjectNode filter(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
node - the ObjectNode to filter through.predicate - the condition used to filter values.public static Optional<com.fasterxml.jackson.databind.JsonNode> find(com.fasterxml.jackson.databind.node.ArrayNode node, Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
node - the ArrayNode to search.predicate - the condition to match the values against.public static Optional<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> find(com.fasterxml.jackson.databind.node.ObjectNode node, Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
node - the ObjectNode to search.predicate - the condition to match the entries against.public static Set<String> keys(com.fasterxml.jackson.databind.node.ObjectNode node)
node - the ObjectNode to retrieve keys for.public static com.fasterxml.jackson.databind.JsonNode last(com.fasterxml.jackson.databind.node.ArrayNode node)
node - a new ArrayNode instance.public static com.fasterxml.jackson.databind.node.ArrayNode map(com.fasterxml.jackson.databind.node.ArrayNode node,
Function<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.JsonNode> function)
node - the ArrayNode to map.function - the mapping function.public static com.fasterxml.jackson.databind.node.ObjectNode map(com.fasterxml.jackson.databind.node.ObjectNode node,
Function<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>,Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> function)
node - the ObjectNode to map.function - the mapping function.public static com.fasterxml.jackson.databind.node.ObjectNode merge(com.fasterxml.jackson.databind.node.ObjectNode... nodes)
nodes - the ObjectNode instances to merge.public static com.fasterxml.jackson.databind.node.ArrayNode newArrayNode()
public static com.fasterxml.jackson.databind.node.ArrayNode newArrayNode(com.fasterxml.jackson.databind.JsonNode... nodes)
nodes - the nodes to populate with.public static com.fasterxml.jackson.databind.node.BigIntegerNode newBigIntegerNode(@Nonnull BigInteger value)
value - the BigIntegerNode value of this entry.public static com.fasterxml.jackson.databind.node.DecimalNode newDecimalNode(@Nonnull BigDecimal value)
value - the BigDecimal value of this entry.public static com.fasterxml.jackson.databind.node.BooleanNode newBooleanNode(@Nonnull Boolean value)
value - the Boolean value of this entry.public static com.fasterxml.jackson.databind.node.BinaryNode newBinaryNode(@Nonnull byte[] value)
value - the byte[] value of this entry.public static com.fasterxml.jackson.databind.node.DoubleNode newDoubleNode(@Nonnull Double value)
value - the Double value of this entry.public static com.fasterxml.jackson.databind.node.FloatNode newFloatNode(@Nonnull Float value)
value - the Float value of this entry.public static com.fasterxml.jackson.databind.node.IntNode newIntNode(@Nonnull Integer value)
value - the Integer value of this entry.public static com.fasterxml.jackson.databind.node.LongNode newLongNode(@Nonnull Long value)
value - the Long value of this entry.public static com.fasterxml.jackson.databind.node.POJONode newPojoNode(@Nonnull Object value)
value - the Object value of this entry.public static com.fasterxml.jackson.databind.node.ShortNode newShortNode(@Nonnull Short value)
value - the Short value of this entry.public static com.fasterxml.jackson.databind.node.TextNode newTextNode(@Nonnull String value)
value - the String value of this entry.public static Iterable<com.fasterxml.jackson.databind.JsonNode> newIterable(com.fasterxml.jackson.databind.JsonNode node)
node - the node to use when seeding the Iterable.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, com.fasterxml.jackson.databind.JsonNode value)
key - the key of this entry as a String.value - the JsonNode value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, BigDecimal value)
key - the key of this entry as a String.value - the BigDecimal value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, BigInteger value)
key - the key of this entry as a String.value - the BigInteger value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, Boolean value)
key - the key of this entry as a String.value - the Boolean value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, byte[] value)
key - the key of this entry as a String.value - the byte[] value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, Double value)
key - the key of this entry as a String.value - the Double value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, Float value)
key - the key of this entry as a String.value - the Float value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, Integer value)
key - the key of this entry as a String.value - the Integer value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, Long value)
key - the key of this entry as a String.value - the Long value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, Object value)
key - the key of this entry as a String.value - the Object value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, Short value)
key - the key of this entry as a String.value - the Short value of this entry.public static Map.Entry<String,com.fasterxml.jackson.databind.JsonNode> newJsonEntry(String key, String value)
key - the key of this entry as a String.value - the String value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(BigDecimal value)
value - the BigDecimal value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(BigInteger value)
value - the BigInteger value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(Boolean value)
value - the Boolean value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(byte[] value)
value - the byte[] value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(Double value)
value - the Double value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(Float value)
value - the Float value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(Integer value)
value - the Integer value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(Long value)
value - the Long value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(Object value)
value - the Object value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(Short value)
value - the Short value of this entry.public static com.fasterxml.jackson.databind.JsonNode newJsonNode(String value)
value - the String value of this entry.public static com.fasterxml.jackson.databind.node.ObjectNode newObjectNode()
@SafeVarargs public static com.fasterxml.jackson.databind.node.ObjectNode newObjectNode(Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>... entries)
entries - the entries to populate with.public static boolean none(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
node - the ArrayNode to verify.predicate - the condition to match against.public static boolean none(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
node - the ObjectNode to verify.predicate - the condition to match against.public static com.fasterxml.jackson.databind.node.ObjectNode omit(com.fasterxml.jackson.databind.node.ObjectNode node,
String... keys)
node - the ObjectNode to omit from.keys - the keys to omit.public static com.fasterxml.jackson.databind.node.ObjectNode omit(com.fasterxml.jackson.databind.node.ObjectNode node,
Collection<String> keys)
node - the ObjectNode to omit from.keys - the keys to omit.public static com.fasterxml.jackson.databind.node.ObjectNode pick(com.fasterxml.jackson.databind.node.ObjectNode node,
String... keys)
node - the ObjectNode to pick from.keys - the keys to pick.public static com.fasterxml.jackson.databind.node.ObjectNode pick(com.fasterxml.jackson.databind.node.ObjectNode node,
Collection<String> keys)
node - the ObjectNode to pick from.keys - the keys to pick.public static <T> T reduce(com.fasterxml.jackson.databind.node.ArrayNode node,
T initial,
BiFunction<T,com.fasterxml.jackson.databind.JsonNode,T> function)
T - the type of the result.node - the ArrayNode to reduce.initial - the initial accumulator state.function - the reducing function.public static <T> T reduce(com.fasterxml.jackson.databind.node.ObjectNode node,
T initial,
BiFunction<T,Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>,T> function)
T - the type of the result.node - the ObjectNode to reduce.initial - the initial accumulator state.function - the reducing function.public static com.fasterxml.jackson.databind.node.ArrayNode reject(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
filter(ArrayNode, Predicate) this method
filters out values rather than filtering them in.node - the ArrayNode to filter through.predicate - the condition used to filter values.public static com.fasterxml.jackson.databind.node.ObjectNode reject(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
filter(ObjectNode, Predicate) this method
filters out values rather than filtering them in.node - the ObjectNode to filter through.predicate - the condition used to filter values.public static boolean some(com.fasterxml.jackson.databind.node.ArrayNode node,
Predicate<com.fasterxml.jackson.databind.JsonNode> predicate)
node - the ArrayNode to verify.predicate - the condition to match against.public static boolean some(com.fasterxml.jackson.databind.node.ObjectNode node,
Predicate<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> predicate)
node - the ObjectNode to verify.predicate - the condition to match against.public static Stream<com.fasterxml.jackson.databind.JsonNode> stream(com.fasterxml.jackson.databind.node.ArrayNode node)
node - the ArrayNode to stream.public static Stream<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>> stream(com.fasterxml.jackson.databind.node.ObjectNode node)
node - the ObjectNode to stream.public static com.fasterxml.jackson.databind.node.ArrayNode take(com.fasterxml.jackson.databind.node.ArrayNode node,
int count)
node - the node to take from.count - the number of nodes to take.public static com.fasterxml.jackson.databind.node.ArrayNode transform(com.fasterxml.jackson.databind.node.ArrayNode node,
Function<Stream<com.fasterxml.jackson.databind.JsonNode>,Stream<com.fasterxml.jackson.databind.JsonNode>> transformer)
node - the ArrayNode to transform.transformer - the Stream transformer.public static com.fasterxml.jackson.databind.node.ObjectNode transform(com.fasterxml.jackson.databind.node.ObjectNode node,
Function<Stream<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>>,Stream<Map.Entry<String,com.fasterxml.jackson.databind.JsonNode>>> transformer)
node - the ObjectNode to transform.transformer - the Stream transformer.public static com.fasterxml.jackson.databind.node.ArrayNode uniq(com.fasterxml.jackson.databind.node.ArrayNode node)
node - the input ArrayNode to uniq.public static com.fasterxml.jackson.databind.node.ArrayNode values(com.fasterxml.jackson.databind.node.ObjectNode node)
node - the ObjectNode to retrieve values for.Copyright © 2017. All rights reserved.