01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.config.schema;
05:
06: import com.tc.util.Assert;
07:
08: /**
09: * Represents the configuration model.
10: */
11: public class ConfigurationModel {
12:
13: public static final ConfigurationModel DEVELOPMENT = new ConfigurationModel(
14: "development");
15: public static final ConfigurationModel PRODUCTION = new ConfigurationModel(
16: "production");
17:
18: private final String type;
19:
20: private ConfigurationModel(String type) {
21: Assert.assertNotBlank(type);
22: this .type = type;
23: }
24:
25: public boolean equals(Object that) {
26: return (that instanceof ConfigurationModel)
27: && ((ConfigurationModel) that).type.equals(this .type);
28: }
29:
30: public int hashCode() {
31: return this .type.hashCode();
32: }
33:
34: public String toString() {
35: return this.type;
36: }
37:
38: }
|