equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
115 * for the given key (if at least one exists). |
115 * for the given key (if at least one exists). |
116 * @param key the key to search for |
116 * @param key the key to search for |
117 * @return the first string value associated with the key |
117 * @return the first string value associated with the key |
118 */ |
118 */ |
119 public String getFirst (String key) { |
119 public String getFirst (String key) { |
120 List<String> l = map.get(normalize((String)key)); |
120 List<String> l = map.get(normalize(key)); |
121 if (l == null) { |
121 if (l == null) { |
122 return null; |
122 return null; |
123 } |
123 } |
124 return l.get(0); |
124 return l.get(0); |
125 } |
125 } |