1. /*
  2. * @(#)SpecialMapping.java 1.9 00/01/19
  3. *
  4. * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. /*
  11. * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
  12. * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
  13. *
  14. * The original version of this source code and documentation
  15. * is copyrighted and owned by Taligent, Inc., a wholly-owned
  16. * subsidiary of IBM. These materials are provided under terms
  17. * of a License Agreement between Taligent and Sun. This technology
  18. * is protected by multiple US and International patents.
  19. *
  20. * This notice and attribution to Taligent may not be removed.
  21. * Taligent is a registered trademark of Taligent, Inc.
  22. *
  23. */
  24. package java.text;
  25. /**
  26. * This class represents exceptions to the normal unicode category
  27. * mapping provided by Character. It is internal only. It represents
  28. * a range of characters that don't follow the category mapping.
  29. */
  30. final class SpecialMapping
  31. {
  32. /**
  33. * The first character in exception range
  34. */
  35. public char startChar;
  36. /**
  37. * The last character in the exception range
  38. */
  39. public char endChar;
  40. /**
  41. * The category for characters in the range
  42. */
  43. public int newValue;
  44. /**
  45. * Construct a mapping for a single character
  46. * @param ch the character
  47. * @param newValue the new category for the character
  48. */
  49. public SpecialMapping(char ch, int newValue)
  50. {
  51. this(ch, ch, newValue);
  52. }
  53. /**
  54. * Construct a mapping for a range of characters
  55. * @param startChar the first character in the range
  56. * @param endChar the last character in the range
  57. * @param newValue the category for the range
  58. */
  59. public SpecialMapping(char startChar, char endChar, int newValue)
  60. {
  61. this.startChar = startChar;
  62. this.endChar = endChar;
  63. this.newValue = newValue;
  64. }
  65. }