1 4 package com.tc.config.schema; 5 6 import com.tc.util.Assert; 7 8 11 public class LicenseType { 12 13 public static final LicenseType NONE = new LicenseType("none"); 14 public static final LicenseType TRIAL = new LicenseType("trial"); 15 public static final LicenseType PRODUCTION = new LicenseType("production"); 16 17 private final String type; 18 19 private LicenseType(String type) { 20 Assert.assertNotBlank(type); 21 this.type = type; 22 } 23 24 public boolean equals(Object that) { 25 return (that instanceof LicenseType) && ((LicenseType) that).type.equals(this.type); 26 } 27 28 public int hashCode() { 29 return this.type.hashCode(); 30 } 31 32 public String toString() { 33 return this.type; 34 } 35 36 public String getType() { 37 return this.type; 38 } 39 40 } 41 | Popular Tags |