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

jsonvalues.JsDoubleLens Maven / Gradle / Ivy

package jsonvalues;


/**
 Represent a Lens which focus is a double number located at a path in a Json

 @param  the type of the whole part, an array or an object */
class JsDoubleLens> extends Lens {
    JsDoubleLens(final JsPath path) {
        super(json -> json.getDouble(path),
              n -> json -> json.set(path,
                                    JsDouble.of(n))
             );
    }
}