001/* 002 * Copyright 2005,2009 Ivan SZKIBA 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ini4j.test; 017 018import org.ini4j.test.DwarfsData.DwarfData; 019 020public final class TaleData 021{ 022 public static final String PROP_DWARFS = "dwarfs"; 023 public static final char PATH_SEPARATOR = '/'; 024 public static final DwarfData bashful; 025 public static final DwarfData doc; 026 public static final DwarfData dopey; 027 public static final DwarfData grumpy; 028 public static final DwarfData happy; 029 public static final DwarfData sleepy; 030 public static final DwarfData sneezy; 031 032 static 033 { 034 bashful = newDwarfData(DwarfsData.bashful); 035 doc = newDwarfData(DwarfsData.doc); 036 dopey = newDwarfData(DwarfsData.dopey); 037 grumpy = newDwarfData(DwarfsData.grumpy); 038 happy = newDwarfData(DwarfsData.happy); 039 sleepy = newDwarfData(DwarfsData.sleepy); 040 sneezy = newDwarfData(DwarfsData.sneezy); 041 } 042 043 private TaleData() 044 { 045 } 046 047 private static DwarfData newDwarfData(DwarfData orig) 048 { 049 return new DwarfData(PROP_DWARFS + PATH_SEPARATOR + orig.name, orig.age, orig.fortuneNumber, orig.height, orig.homeDir, orig.homePage.toString(), orig.weight); 050 } 051}