1.2 KiB
1.2 KiB
Mon
TypeAlias for Java
Maven
<dependency>
<groupId>net.kemitix</groupId>
<artifactId>mon</artifactId>
<version>0.3.0</version>
</dependency>
Usage
TypeAlias
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());
}