|
Tools |
|
1 /* 2 * Tools.java 3 * 4 * Copyright (c) 1998-2001, The University of Sheffield. 5 * 6 * This file is part of GATE (see http://gate.ac.uk/), and is free 7 * software, licenced under the GNU Library General Public License, 8 * Version 2, June 1991 (in the distribution as file licence.html, 9 * and also available at http://gate.ac.uk/gate/licence.html). 10 * 11 * Valentin Tablan, Jan/2000 12 * 13 * $Id: Tools.java,v 1.10 2000/11/08 16:35:11 hamish Exp $ 14 */ 15 16 package gate.util; 17 18 import java.util.*; 19 20 public class Tools { 21 22 /** Debug flag */ 23 private static final boolean DEBUG = false; 24 25 public Tools() { 26 } 27 static long sym=0; 28 29 /** Returns a Long wich is unique during the current run. 30 * Maybe we should use serializaton in order to save the state on 31 * System.exit... 32 */ 33 static public synchronized Long gensym(){ 34 return new Long(sym++); 35 } 36 37 static public synchronized Long genTime(){ 38 39 return new Long(new Date().getTime()); 40 } 41 42 43 /** Specifies whether Gate should or shouldn't know about Unicode */ 44 static public void setUnicodeEnabled(boolean value){ 45 unicodeEnabled = value; 46 } 47 48 /** Checks wheter Gate is Unicode enabled */ 49 static public boolean isUnicodeEnabled(){ 50 return unicodeEnabled; 51 } 52 53 /** Does Gate know about Unicode? */ 54 static private boolean unicodeEnabled = false; 55 56 } // class Tools 57
|
Tools |
|