KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > config > schema > LicenseType


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.config.schema;
5
6 import com.tc.util.Assert;
7
8 /**
9  * Represents the type of the license.
10  */

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 JavaDoc type;
18
19   private LicenseType(String JavaDoc type) {
20     Assert.assertNotBlank(type);
21     this.type = type;
22   }
23
24   public boolean equals(Object JavaDoc 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 JavaDoc toString() {
33     return this.type;
34   }
35   
36   public String JavaDoc getType() {
37     return this.type;
38   }
39
40 }
41
Popular Tags