jeremias    2003/07/04 12:55:43

  Modified:    src/java/org/apache/fop/util CharUtilities.java
  Log:
  Some touch-up for style
  
  Revision  Changes    Path
  1.2       +18 -12    xml-fop/src/java/org/apache/fop/util/CharUtilities.java
  
  Index: CharUtilities.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/util/CharUtilities.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CharUtilities.java        11 Mar 2003 13:05:39 -0000      1.1
  +++ CharUtilities.java        4 Jul 2003 19:55:43 -0000       1.2
  @@ -58,7 +58,8 @@
    */
   public class CharUtilities {
   
  -    /** Character code used to signal a character boundary in
  +    /** 
  +     * Character code used to signal a character boundary in
        * inline content, such as an inline with borders and padding
        * or a nested block object.
        */
  @@ -87,10 +88,17 @@
   
   
       /**
  +     * Utility class: Constructor prevents instantiating when subclassed.
  +     */
  +    protected CharUtilities() {
  +        throw new UnsupportedOperationException();
  +    }
  +    
  +    /**
        * Return the appropriate CharClass constant for the type
        * of the passed character.
        * @param c character to inspect
  -     * @return int the determined character class
  +     * @return the determined character class
        */
       public static int classOf(char c) {
           if (c == CODE_EOT) { return EOT; }
  @@ -107,7 +115,7 @@
        * versions of space that might not exists in the font.
        * @param c character to inspect
        * @param fs FontState to use
  -     * @return int the width of the character
  +     * @return the width of the character
        */
       public static int getCharWidth(char c, FontState fs) {
           int width;
  @@ -184,7 +192,7 @@
        * space with normal behaviour. Normal behaviour means that
        * it's not non-breaking.
        * @param c character to inspect
  -     * @return boolean True if the character is a normal space
  +     * @return True if the character is a normal space
        */
       public static boolean isSpace(char c) {
           return (c == ' '
  @@ -207,16 +215,14 @@
        * Method to determine if the character is a nonbreaking
        * space.
        * @param c character to check
  -     * @return boolean True if the character is a nbsp
  +     * @return True if the character is a nbsp
        */
       public static boolean isNBSP(char c) {
  -        if (c == '\u00A0' || c == '\u202F'    // narrow no-break space
  -            || c == '\u3000'                  // ideographic space
  -            || c == '\uFEFF') {               // zero width no-break space
  -            return true;
  -        } else {
  -            return false;
  -        }
  +        return
  +            (c == '\u00A0'      // no-break space
  +            || c == '\u202F'    // narrow no-break space
  +            || c == '\u3000'    // ideographic space
  +            || c == '\uFEFF');  // zero width no-break space
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to