map-utils

This Java library contains the APIs to sort the map, update a specific field and get a specific field from a map. Also get the list of properties from a given map and convert the entire map into a list of properties.

License

License

GroupId

GroupId

dev.javatools
ArtifactId

ArtifactId

map-utils
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

map-utils
This Java library contains the APIs to sort the map, update a specific field and get a specific field from a map. Also get the list of properties from a given map and convert the entire map into a list of properties.
Project URL

Project URL

https://www.javatools.dev
Source Code Management

Source Code Management

https://github.com/dev-java-tools/map-utils/tree/master

Download map-utils

How to add to project

<!-- https://jarcasting.com/artifacts/dev.javatools/map-utils/ -->
<dependency>
    <groupId>dev.javatools</groupId>
    <artifactId>map-utils</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/dev.javatools/map-utils/
implementation 'dev.javatools:map-utils:1.0.1'
// https://jarcasting.com/artifacts/dev.javatools/map-utils/
implementation ("dev.javatools:map-utils:1.0.1")
'dev.javatools:map-utils:jar:1.0.1'
<dependency org="dev.javatools" name="map-utils" rev="1.0.1">
  <artifact name="map-utils" type="jar" />
</dependency>
@Grapes(
@Grab(group='dev.javatools', module='map-utils', version='1.0.1')
)
libraryDependencies += "dev.javatools" % "map-utils" % "1.0.1"
[dev.javatools/map-utils "1.0.1"]

Dependencies

compile (7)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-core jar [2.12.0,)
com.fasterxml.jackson.core : jackson-databind jar [2.12.0,)
com.fasterxml.jackson.dataformat : jackson-dataformat-yaml jar [2.12.0,)
org.slf4j : slf4j-api jar [1.7.30,)
org.slf4j : slf4j-simple jar [1.7.30,)
org.junit.jupiter : junit-jupiter jar [5.7.0,)
org.projectlombok : lombok jar [1.18.16,)

Project Modules

There are no modules declared in this project.

map-utils

This Java library contains the API to

  • Sort a map

    • Sort on custom keys if the map has a list of objects
  • Get the list of all the properties in a Map

  • Get the list of all the paths in a Map

  • Update map by specifying the path of the element in the map and its value

    • Examples
      • friends[{name=Lenna Paprocki}].associatedAddresses[{state=TX}, {city=Irving}].street
        • In the above example, you can set the street field on the associatedAddresses object that has state as TX and city as Irving. Also when this associatedAddresses belongs to a friend whose name field s the value of Lenna Paprocki.
      • friends[{name=Lenna Paprocki}].associatedAddresses[{state=TX}].city"
        • In the above example, you can set the street field on the associatedAddresses object that has state as TX. Also when this associatedAddresses belongs to a friend whose name field s the value of Lenna Paprocki.
      • friends[2].associatedAddresses[5].city
        • In this you are setting the city of the 6th associatedAddresses of the 3rd friend.
      • friends[].associatedAddresses[5].city
        • In this you are setting the city of the 6th associatedAddresses of the first (default) friend in the list.
  • Create Map from

    • String
    • Java File object
    • Also from a custom model objects

Versions

Version
1.0.1
1.0.0
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1