01 package gate.creole.annic.apache.lucene.util;
02
03 /**
04 * Copyright 2004 The Apache Software Foundation
05 *
06 * Licensed under the Apache License, Version 2.0 (the "License");
07 * you may not use this file except in compliance with the License.
08 * You may obtain a copy of the License at
09 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 /**
20 * Some useful constants.
21 *
22 * @author Doug Cutting
23 * @version $Id: Constants.java 529 2004-10-05 11:55:26Z niraj $
24 **/
25
26 public final class Constants {
27 private Constants() {} // can't construct
28
29 /** The value of <tt>System.getProperty("java.version")<tt>. **/
30 public static final String JAVA_VERSION = System.getProperty("java.version");
31 /** True iff this is Java version 1.1. */
32 public static final boolean JAVA_1_1 = JAVA_VERSION.startsWith("1.1.");
33 /** True iff this is Java version 1.2. */
34 public static final boolean JAVA_1_2 = JAVA_VERSION.startsWith("1.2.");
35 /** True iff this is Java version 1.3. */
36 public static final boolean JAVA_1_3 = JAVA_VERSION.startsWith("1.3.");
37
38 /** The value of <tt>System.getProperty("os.name")<tt>. **/
39 public static final String OS_NAME = System.getProperty("os.name");
40 /** True iff running on Linux. */
41 public static final boolean LINUX = OS_NAME.startsWith("Linux");
42 /** True iff running on Windows. */
43 public static final boolean WINDOWS = OS_NAME.startsWith("Windows");
44 /** True iff running on SunOS. */
45 public static final boolean SUN_OS = OS_NAME.startsWith("SunOS");
46 }
|