Class DefaultCodePage

  • All Implemented Interfaces:
    CodePage
    Direct Known Subclasses:
    BasicLatin, Greek, Ipa, LatinExtA, LatinExtB, LatinSupp

    public class DefaultCodePage
    extends java.lang.Object
    implements CodePage
    An instance of the class DefaultCodePage represents a range of Unicode characters. This range is defined by the first and the last character in the range, both as integer values. In addition a name can be assigned to the range.

    In this default implementation of the interface CodePage the code page ranges from 0 to 0 and has the name "CodePage". In order to get a useful code page a new class may be derived from this one which overwrites the constructor in a way that it sets the first and the last character and an appropriate name for the code page.

    Version:
    $Revision: 1.1 $
    Author:
    Simone Leonardi
    See Also:
    http://www.unicode.org/charts/
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultCodePage()
      Creates a new CodePage instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getFirstCharacter()
      Get the value of the first character in the range.
      int getLastCharacter()
      Get the value of the last character in the range.
      java.lang.String getName()
      Get the name of the code page.
      void setFirstCharacter​(int v)
      Set the value of the first character in the range.
      void setLastCharacter​(int v)
      Set the value of the last character in the range.
      void setName​(java.lang.String v)
      Set the name of the code page.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultCodePage

        public DefaultCodePage()
        Creates a new CodePage instance. Here the instance variables firstCharacter, lastCharacter and name are set with the appropriate methods.
    • Method Detail

      • getFirstCharacter

        public int getFirstCharacter()
        Get the value of the first character in the range.
        Specified by:
        getFirstCharacter in interface CodePage
        Returns:
        the int value of a character
      • setFirstCharacter

        public void setFirstCharacter​(int v)
        Set the value of the first character in the range.
        Specified by:
        setFirstCharacter in interface CodePage
        Parameters:
        v - the int value of a character
      • getLastCharacter

        public int getLastCharacter()
        Get the value of the last character in the range.
        Specified by:
        getLastCharacter in interface CodePage
        Returns:
        the int value of a character
      • setLastCharacter

        public void setLastCharacter​(int v)
        Set the value of the last character in the range.
        Specified by:
        setLastCharacter in interface CodePage
        Parameters:
        v - the int value of a character
      • getName

        public java.lang.String getName()
        Get the name of the code page.
        Specified by:
        getName in interface CodePage
        Returns:
        the name as String value
      • setName

        public void setName​(java.lang.String v)
        Set the name of the code page.
        Specified by:
        setName in interface CodePage
        Parameters:
        v - the name as String value