| 1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2010 Cloudsmith Inc. and others. |
| 3 |
* |
| 4 |
* This program and the accompanying materials |
| 5 |
* are made available under the terms of the Eclipse Public License 2.0 |
| 6 |
* which accompanies this distribution, and is available at |
| 7 |
* https://www.eclipse.org/legal/epl-2.0/ |
| 8 |
* |
| 9 |
* SPDX-License-Identifier: EPL-2.0 |
| 10 |
* |
| 11 |
* Contributors: |
| 12 |
* Cloudsmith Inc. - initial API and implementation |
| 13 |
*******************************************************************************/ |
| 14 |
package org.eclipse.equinox.p2.metadata; |
| 15 |
|
| 16 |
import java.io.Serializable; |
| 17 |
import java.util.Locale; |
| 18 |
|
| 19 |
/** |
| 20 |
* A key that can be used to extract a localized property for a specified Locale |
| 21 |
* @noextend This class is not intended to be subclassed by clients. |
| 22 |
* @since 2.0 |
| 23 |
*/ |
| 24 |
public final class KeyWithLocale implements Serializable { |
| 25 |
private static final long serialVersionUID = 8818242663547645188L; |
| 26 |
private final String key; |
| 27 |
private final Locale locale; |
| 28 |
|
| 29 |
public KeyWithLocale(String key, Locale locale) { |
| 30 |
this.key = key; |
| 31 |
this.locale = locale; |
| 32 |
} |
| 33 |
|
| 34 |
public String getKey() { |
| 35 |
return key; |
| 36 |
} |
| 37 |
|
| 38 |
public Locale getLocale() { |
| 39 |
return locale; |
| 40 |
} |
| 41 |
} |