KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > config > schema > Root


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.object.config.schema;
5
6 import com.tc.util.Assert;
7 import com.tc.util.stringification.OurStringBuilder;
8
9 /**
10  * Represents a root.
11  */

12 public class Root {
13
14   private final String JavaDoc rootName;
15   private final String JavaDoc fieldName;
16
17   public Root(String JavaDoc rootName, String JavaDoc fieldName) {
18     Assert.assertNotBlank(fieldName);
19
20     this.rootName = rootName;
21     this.fieldName = fieldName;
22   }
23
24   public String JavaDoc rootName() {
25     return this.rootName;
26   }
27
28   public String JavaDoc fieldName() {
29     return this.fieldName;
30   }
31
32   public String JavaDoc toString() {
33     return new OurStringBuilder(this, OurStringBuilder.COMPACT_STYLE).append("name", this.rootName)
34         .append("field", this.fieldName).toString();
35   }
36 }
37
Popular Tags