Sugar Cubes are pieces of java code which make your everyday development sweet enough. The library requires Java 8 or higher.
Gradle:
compile 'org.sugarcubes:sugar-cubes-library:0.1.0-SNAPSHOT'
Maven:
<dependency>
...
</dependency>
Provides generic builder pattern as well as some builders for collections.
Generic builder:
Map<String, Integer> map = Builders.<Map<String, Integer>>of(HashMap::new)
.apply(Invocations.call(Map::put, "teeth", 32))
.apply(Invocations.call(Map::put, "fingers", 8))
.transform(Collections::unmodifiableMap)
.build();
Same thing done with MapBuilder:
Map<String, Integer> map = MapBuilder.<String, Integer>hashMap()
.put("teeth", 32)
.put("fingers", 8)
.transform(Collections::unmodifiableMap)
.build();
Set builder:
Set<String> set = SetBuilder.<String>hashSet()
.addAll("ugly", "coyote")
.transform(Collections::unmodifiableSet)
.build();
Tools for faster deep cloning of different kind of objects.
Set of wrappers for Java Reflection classes. Simplifies working with Reflection API.
REx means "runtime exceptions". This module helps to handle checked exceptions and translate them into unchecked.
Simple (but enough for most cases) java tuple implementation.
Sandbox is a place for sweet candydates. The code here is mostly experimental.
Generic API for proxy creation via various providers.