jp.gopay.sdk.models.common.BaseId Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gopay-java-sdk Show documentation
Show all versions of gopay-java-sdk Show documentation
Official Gyro-n Payments Java SDK
package jp.gopay.sdk.models.common;
import java.util.UUID;
/**
* BaseId
* Class extended by ID classes. Allows creating ID objects by passing a string or a UUID.
*/
public abstract class BaseId {
private UUID id;
public BaseId(String id){
this.id = UUID.fromString(id);
}
public BaseId(UUID id){
this.id = id;
}
@Override
public String toString(){
if(this.id == null){
return null;
}
return this.id.toString();
}
public UUID toUUID(){
return this.id;
}
}