2 * Copyright (C) 2010 Google Inc.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com.android.i18n.addressinput;
19 import java.util.Iterator;
23 * A map of {@link AddressDataKey}s to JSON strings. Provides data for a single node in the address
24 * data hierarchy (for example, "data/US/CA"). Key is an AddressDataKey and the value is the raw
25 * string representing that data. This is either a single string, or an array of strings represented
26 * as a single string using '~' to separate the elements of the array, depending on the
29 public class AddressVerificationNodeData {
31 private final Map<AddressDataKey, String> map;
33 public AddressVerificationNodeData(Map<AddressDataKey, String> map) {
34 Util.checkNotNull("Cannot construct StandardNodeData with null map");
39 * Iterates through the map.
41 public Iterator<AddressDataKey> iterator() {
42 return map.keySet().iterator();
45 public boolean containsKey(AddressDataKey key) {
46 return map.containsKey(key);
50 * Gets the value for a particular key in the map.
52 public String get(AddressDataKey key) {