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