package at.gv.egiz.pdfas.api.commons; import java.io.Serializable; /** * Pseudo enum defining lifetime models for {@link DynamicSignatureProfile}s. * * @author exthex * */ public final class DynamicSignatureLifetimeEnum implements Serializable { private static final long serialVersionUID = 1L; private int value; /** * Automatic lifetime bound to one sign process */ public static final DynamicSignatureLifetimeEnum AUTO = new DynamicSignatureLifetimeEnum(1); /** * Manual lifetime making YOU responsible for calling {@link DynamicSignatureProfile#dispose()}. */ public static final DynamicSignatureLifetimeEnum MANUAL = new DynamicSignatureLifetimeEnum(2); private DynamicSignatureLifetimeEnum(int val) { this.value = val; } public int hashCode() { return value; } public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; DynamicSignatureLifetimeEnum other = (DynamicSignatureLifetimeEnum) obj; if (value != other.value) return false; return true; } }