public class Lodash extends Object
UniversalContainer containers.
Note: Implementation based on the Lodash 3.10.1 [https://lodash.com/license]
| Modifier and Type | Method and Description |
|---|---|
static UniversalContainer |
clone(UniversalContainer value)
Creates a shallow copy of the value.
|
static UniversalContainer |
extend(UniversalContainer object,
UniversalContainer... sources)
Assigns own enumerable properties of source OBJECT container(s) to the destination OBJECT container.
|
static boolean |
isArray(Object value)
Checks if value is classified as an ARRAY container.
|
static boolean |
isEqual(UniversalContainer value,
Object other)
Performs a deep comparison between two values to determine if they are equivalent.
|
static boolean |
isNull(Object value)
Checks if value is classified as a NULL container.
|
static boolean |
isObject(Object value)
Checks if value is classified as an OBJECT container.
|
static boolean |
isUndefined(Object value)
Checks if value is classified as a UNDEFINED container.
|
static UniversalContainer |
last(UniversalContainer array)
Gets the last element of enumerable container like ARRAY or STRING LITERAL.
|
static UniversalContainer |
merge(UniversalContainer object,
UniversalContainer... sources)
Recursively merges own enumerable properties of the source OBJECT container(s), that don't resolve to UNDEFINED
into the destination OBJECT container.
|
static UniversalContainer |
merge(UniversalContainer object,
ValueCustomizer customizer,
UniversalContainer... sources)
Recursively merges own enumerable properties of the source OBJECT container(s), that don't resolve to UNDEFINED
into the destination OBJECT container.
|
static UniversalContainer |
values(UniversalContainer object)
Creates an ARRAY continer of the own enumerable string keyed property values of OBJECT container.
|
public static boolean isArray(Object value)
false.value - object of any class, which will be testedtrue if value is classified as ARRAY container; false otherwise.public static boolean isObject(Object value)
false.value - object of any class, which will be testedtrue if value is classified as OBJECT container; false otherwise.public static boolean isNull(Object value)
value - object of any class, which will be testedtrue if value is classified as NULL container; false otherwise.public static boolean isUndefined(Object value)
value - object of any class, which will be testedtrue if value is classified as UNDEFINED container; false otherwise.public static boolean isEqual(UniversalContainer value, Object other)
Note: This method supports comparing all known containers, objects of primitive classes and classes like List, Set, Map, and also arrays of any type. OBJECT containers are compared by their own, not inherited, enumerable properties.
value - the container to compareother - the other value of any class to comparetrue if the values are equivalent; false otherwise.public static UniversalContainer clone(UniversalContainer value)
value - any container to clonepublic static UniversalContainer last(UniversalContainer array)
array - any enumerable container to querypublic static UniversalContainer extend(UniversalContainer object, UniversalContainer... sources)
Note: This method mutates destination OBJECT container.
object - destination containersources - source containers, which will override properties in the destination containerpublic static UniversalContainer merge(UniversalContainer object, UniversalContainer... sources)
merge(object, null, sources)
Note: This method mutates destination OBJECT container.
object - destination containersources - source containers, which properties will be merged into the destination containerpublic static UniversalContainer merge(UniversalContainer object, ValueCustomizer customizer, UniversalContainer... sources)
Note: This method mutates destination OBJECT container.
object - destination containercustomizer - instance of ValueCustomizer class with a custom logic, which will be aplied to every pairsources - source containers, which properties will be merged into the destination containerpublic static UniversalContainer values(UniversalContainer object)
object - OBJECT container to query for values.