tech.simter.data.Id Maven / Gradle / Ivy
package tech.simter.data;
/**
* A ID holder.
*
* @author RJ
*/
public class Id {
protected T id;
Id(T id) {
this.id = id;
}
/**
* Get the identity
*
* @return the identity
*/
public T getId() {
return id;
}
/**
* Create a Id instance.
*
* @param the identity type
* @param id the identity value
* @return the instance
*/
public static Id with(TT id) {
return new Id<>(id);
}
}