1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 /*
24  * A special HashMap,
25  * can be constructed of
26  * two Arrays
27  */
28 package com.sun.star.tooling.converter;
29 
30 import java.util.HashMap;
31 import java.util.Map;
32 
33 /**
34  * @author Christian Schmidt
35  *
36  * Create a Hash Map from two Arrays
37  *
38  */
39 public class ExtMap extends HashMap {
40 
41     /**
42      *
43      */
ExtMap()44     public ExtMap() {
45         super();
46 
47     }
48 
49     /**
50      * @see java.util.HashMap
51      * @param arg0
52      */
ExtMap(int arg0)53     public ExtMap(int arg0) {
54         super(arg0);
55 
56     }
57 
58     /**
59      * @param arg0
60      * @param arg1
61      */
ExtMap(int arg0, float arg1)62     public ExtMap(int arg0, float arg1) {
63         super(arg0, arg1);
64 
65     }
66 
67     /**
68      * @param arg0
69      */
ExtMap(Map arg0)70     public ExtMap(Map arg0) {
71         super(arg0);
72 
73     }
74 
75     // create a new Map from two string arrays
ExtMap(String[] names, String[] content)76     public ExtMap(String[] names, String[] content) {
77         super(names.length);
78         if (content == null)
79             content = new String[names.length];
80         for (int i = 0; i < names.length; i++) {
81             if (i >= content.length) {
82                 break;
83             } else {
84                 this.put(names[i], content[i]);
85             }
86         }
87 
88     }
89 
90 }