Skip to content

robinp/JavaLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

JavaLens
--------

Small example on using Lens from Java.

Without Lens, modifying a deep nested immutable structure is inconvenient,
but with Lens it becomes quite easy.

See
---
javalens.logic.UpdateTest for using basic lens
javalens.logic.MapLensTest for using lens for maps
javalens.logic.ComposedMapLensTest for combining various lens to access deep structures

Notes
-----
Now using lombok to generate DTO accessors, etc. When using maven, lombok is automatically used.
Lombok setup for your IDE:
* Eclipse   -> Go to http://projectlombok.org/ then download and execute the jar file
* Idea      -> Install lombok plugin

Todo
----
* MapLens creates a new HashMap on return. It would be nicer to use pcollections' persistent maps
  for efficient differential updates.

About

Example Lens implementation in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages