TypeAlias, Result, Maybe and others for Java
.mvn/wrapper | ||
.travis-support@b8593e541b | ||
src | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
CHANGELOG | ||
codesigning.asc.enc | ||
LICENSE.txt | ||
mvnw | ||
mvnw.cmd | ||
pom.xml | ||
README.md |
Mon
TypeAlias for Java
Maven
<dependency>
<groupId>net.kemitix</groupId>
<artifactId>mon</artifactId>
<version>${mon.version}</version>
</dependency>
Usage
class Goal extends TypeAlias<String> {
private Goal(final String goal) {
super(goal);
}
public static Goal of(final String goal) {
return new Goal(goal);
}
}
Goal goal = Goal.of("goal");
void foo(final Goal goal) {
System.out.println("The goal is " + goal.getValue());
}