View Javadoc

1   /*
2    * Copyright 2005,2009 Ivan SZKIBA
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.ini4j.test;
17  
18  import org.ini4j.test.DwarfsData.DwarfData;
19  
20  public final class TaleData
21  {
22      public static final String PROP_DWARFS = "dwarfs";
23      public static final char PATH_SEPARATOR = '/';
24      public static final DwarfData bashful;
25      public static final DwarfData doc;
26      public static final DwarfData dopey;
27      public static final DwarfData grumpy;
28      public static final DwarfData happy;
29      public static final DwarfData sleepy;
30      public static final DwarfData sneezy;
31  
32      static
33      {
34          bashful = newDwarfData(DwarfsData.bashful);
35          doc = newDwarfData(DwarfsData.doc);
36          dopey = newDwarfData(DwarfsData.dopey);
37          grumpy = newDwarfData(DwarfsData.grumpy);
38          happy = newDwarfData(DwarfsData.happy);
39          sleepy = newDwarfData(DwarfsData.sleepy);
40          sneezy = newDwarfData(DwarfsData.sneezy);
41      }
42  
43      private TaleData()
44      {
45      }
46  
47      private static DwarfData newDwarfData(DwarfData orig)
48      {
49          return new DwarfData(PROP_DWARFS + PATH_SEPARATOR + orig.name, orig.age, orig.fortuneNumber, orig.height, orig.homeDir, orig.homePage.toString(), orig.weight);
50      }
51  }