Package com.github.jsonldjava.utils
Class Obj
java.lang.Object
com.github.jsonldjava.utils.Obj
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanA null-safe equals check using v1.equals(v2) if they are both not null.static ObjectUsed to make getting values from maps embedded in maps embedded in maps easier TODO: roll out the loops for efficiencynewMap()Helper function for creating maps and tuning them as necessary.Helper function for creating maps and tuning them as necessary.static Objectstatic Objectstatic Objectstatic Objectstatic Object
-
Constructor Details
-
Obj
public Obj()
-
-
Method Details
-
newMap
Helper function for creating maps and tuning them as necessary.- Returns:
- A new
Mapinstance.
-
newMap
Helper function for creating maps and tuning them as necessary.- Parameters:
key- A key to add to the map on creation.value- A value to attach to the key in the new map.- Returns:
- A new
Mapinstance.
-
get
Used to make getting values from maps embedded in maps embedded in maps easier TODO: roll out the loops for efficiency- Parameters:
map- The map to get a key fromkeys- The list of keys to attempt to get from the map. The first key found with a non-null value is returned, or if none are found, the original map is returned.- Returns:
- The key from the map, or the original map if none of the keys are found.
-
put
-
put
-
put
-
put
-
contains
-
remove
-
equals
A null-safe equals check using v1.equals(v2) if they are both not null.- Parameters:
v1- The source object for the equals check.v2- The object to be checked for equality using the first objects equals method.- Returns:
- True if the objects were both null. True if both objects were not null and v1.equals(v2). False otherwise.
-