Package | Description |
---|---|
org.ujorm.tools.common |
Class and Description |
---|
Confessionable
An interface for common export an object to an appendable writer
|
Joinable
A joinable function
Usage
Function<Person, String> nameProvider = Joinable
.of (Person::getBoss)
.add(Person::getBoss)
.add(Person::getName);
String superBossName = nameProvider.apply(getPerson());
|
Wrapper
The wrapper implements a common
hash() , equals() and compareTo() methods
Usage:
Person p1 = new Person(1, "A"); Person p2 = new Person(1, "B"); Wrapper<Person> w1 = Wrapper.of(p1, Person::getId, Person::getName); Wrapper<Person> w2 = w1.wrap(p2); assertTrue(w1.compareTo(w2) < 0); |
Copyright 2019-2022, Pavel Ponec