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