Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/sourcetools/j9nls/com/ibm/oti/NLSTool/NLSInfo.java
6004 views
1
/*******************************************************************************
2
* Copyright (c) 2004, 2017 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
*******************************************************************************/
22
package com.ibm.oti.NLSTool;
23
24
import java.util.Vector;
25
26
public class NLSInfo implements Comparable {
27
private String module;
28
private String path;
29
private String headerName;
30
private Vector locales;
31
private Vector msgInfo;
32
private Comparable key;
33
34
public NLSInfo() {
35
locales = new Vector();
36
}
37
38
public void setModule(String module) {
39
this.module = module;
40
this.key = module;
41
}
42
43
public void setPath(String path) {
44
this.path = path;
45
}
46
47
public void setHeaderName(String headerName) {
48
this.headerName = headerName;
49
}
50
51
public void setLocales(Vector locales) {
52
this.locales = locales;
53
}
54
55
public void setMsgInfo(Vector msgInfo) {
56
this.msgInfo = msgInfo;
57
}
58
59
public String getModule() {
60
return module;
61
}
62
63
public String getPath() {
64
return path;
65
}
66
67
public String getHeaderName() {
68
return headerName;
69
}
70
71
public Vector getLocales() {
72
return locales;
73
}
74
75
public Vector getMsgInfo() {
76
return msgInfo;
77
}
78
79
public Comparable getKey() {
80
return key;
81
}
82
83
public void addLocale(String locale) {
84
locales.addElement(locale);
85
}
86
87
public void addMsgInfo(MsgInfo msgInfo) {
88
this.msgInfo.addElement(msgInfo);
89
}
90
91
public boolean isSameNLS(String module, String headerName) {
92
return this.module.equalsIgnoreCase(module) && this.headerName.equalsIgnoreCase(headerName);
93
}
94
95
public int compareTo(Object obj) {
96
return key.compareTo(((NLSInfo)obj).getKey());
97
}
98
}
99
100