All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jsonvalues.JsIntLens Maven / Gradle / Ivy

package jsonvalues;

/**
 * Represent a Lens which focus is an integer number located at a path in a Json
 *
 * @param  the type of the whole part, an array or an object
 */
class JsIntLens> extends Lens {
  JsIntLens(final JsPath path) {
    super(json -> json.getInt(path),
      n -> json -> json.set(path, JsInt.of(n))
    );
  }
}