home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / Java2 / src / java / text / SpecialMapping.java < prev    next >
Encoding:
Java Source  |  1999-05-28  |  2.6 KB  |  80 lines  |  [TEXT/CWIE]

  1. /*
  2.  * @(#)SpecialMapping.java    1.8 98/07/24
  3.  *
  4.  * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
  5.  * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
  6.  *
  7.  * Portions copyright (c) 1996-1998 Sun Microsystems, Inc.
  8.  * All Rights Reserved.
  9.  *
  10.  * The original version of this source code and documentation
  11.  * is copyrighted and owned by Taligent, Inc., a wholly-owned
  12.  * subsidiary of IBM. These materials are provided under terms
  13.  * of a License Agreement between Taligent and Sun. This technology
  14.  * is protected by multiple US and International patents.
  15.  *
  16.  * This notice and attribution to Taligent may not be removed.
  17.  * Taligent is a registered trademark of Taligent, Inc.
  18.  *
  19.  * Permission to use, copy, modify, and distribute this software
  20.  * and its documentation for NON-COMMERCIAL purposes and without
  21.  * fee is hereby granted provided that this copyright notice
  22.  * appears in all copies. Please refer to the file "copyright.html"
  23.  * for further important copyright and licensing information.
  24.  *
  25.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  26.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  27.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  28.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  29.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  30.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  31.  *
  32.  */
  33.  
  34. package java.text;
  35.  
  36. /**
  37.  * This class represents exceptions to the normal unicode category
  38.  * mapping provided by Character. It is internal only.  It represents
  39.  * a range of characters that don't follow the category mapping.
  40.  */
  41. final class SpecialMapping
  42. {
  43.     /**
  44.      * The first character in exception range
  45.      */
  46.     public char startChar;
  47.     /**
  48.      * The last character in the exception range
  49.      */
  50.     public char endChar;
  51.     /**
  52.      * The category for characters in the range
  53.      */
  54.     public int newValue;
  55.  
  56.     /**
  57.      * Construct a mapping for a single character
  58.      * @param ch the character
  59.      * @param newValue the new category for the character
  60.      */
  61.     public SpecialMapping(char ch, int newValue)
  62.     {
  63.         this(ch, ch, newValue);
  64.     }
  65.  
  66.     /**
  67.      * Construct a mapping for a range of characters
  68.      * @param startChar the first character in the range
  69.      * @param endChar the last character in the range
  70.      * @param newValue the category for the range
  71.      */
  72.     public SpecialMapping(char startChar, char endChar, int newValue)
  73.     {
  74.         this.startChar = startChar;
  75.         this.endChar = endChar;
  76.         this.newValue = newValue;
  77.     }
  78. }
  79.  
  80.