001: /*
002: * CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF
003: * NETSCAPE COMMUNICATIONS CORPORATION
004: *
005: * Copyright (c) 1996 Netscape Communications Corporation.
006: * All Rights Reserved.
007: * Use of this Source Code is subject to the terms of the applicable
008: * license agreement from Netscape Communications Corporation.
009: */
010:
011: package util;
012:
013: /**
014: Header file for the utiladdenda package.
015: *
016: */
017: public class Header {
018: /* ----------------------------------------------------------- */
019:
020: /**
021: * Version string.
022: */
023: public final static String VERSION = "Util Package";
024:
025: /**
026: * Long version string.
027: */
028: public final static String LONG_VERSION = VERSION;
029:
030: /**
031: * Prints the version string for the package.
032: */
033: public final static void printVersion() {
034: printVersion(false);
035: }
036:
037: /**
038: * Prints the version string for the package.
039: * @param longVersion true for long version
040: */
041: public final static void printVersion(boolean longVersion) {
042: if (longVersion) {
043: System.out.println(LONG_VERSION);
044: } else {
045: System.out.println(VERSION);
046: }
047: }
048:
049: /* ----------------------------------------------------------- */
050:
051: /**
052: * Index if there's no correct index within the string.
053: */
054: public final static int NOSTRINGINDICE = -1;
055:
056: /* ----------------------------------------------------------- */
057:
058: /**
059: * Numeric characters.
060: */
061: public final static String NUMERIC = "1234567890";
062: /**
063: * Lower case alpha characters.
064: */
065: public final static String LOWERALPHA = "abcdefghijklmnopqrstuvwxyz";
066: /**
067: * Upper case alpha characters.
068: */
069: public final static String UPPERALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
070: /**
071: * Alpha characters.
072: */
073: public final static String ALPHA = LOWERALPHA + UPPERALPHA;
074: /**
075: * Punctuation characters.
076: */
077: public final static String PUNCTUATION = "!@#$%^&*()_+|~-=\\`{}[]:\";'<>?,./";
078: /**
079: * Alphanumeric characters.
080: */
081: public final static String ALPHANUMERIC = ALPHA + NUMERIC;
082: /**
083: * Alphanumeric and punctuation characters.
084: */
085: public final static String ALPHANUMERICPUNCT = ALPHANUMERIC
086: + PUNCTUATION;
087: /**
088: * Line control characters: space, tab, new line and line feed.
089: */
090: public final static String LINECONTROL = " \n\r\t";
091: /**
092: * All characters except tab.
093: */
094: public final static String ALLBUTTAB = ALPHANUMERICPUNCT + "\n\r ";
095: /**
096: * All characters except new line.
097: */
098: public final static String ALLBUTNL = ALPHANUMERICPUNCT + "\t\r ";
099: /**
100: * All characters.
101: */
102: public final static String ALLCHARS = ALPHANUMERICPUNCT
103: + LINECONTROL;
104:
105: }
|