OptionalCharacterProperty (Apache FOP Core 2.11 API)
Date: 2025-04-24

org.apache.fop.fo.properties

## Class OptionalCharacterProperty

- java.lang.Object
- - org.apache.fop.fo.properties.Property
  - - org.apache.fop.fo.properties.OptionalCharacterProperty

-     public final class OptionalCharacterProperty
      extends Property

  Superclass for properties that wrap an optional character value TODO convert character value to int in order to denote unicode scalar value instead of a single UTF-16 code element

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `OptionalCharacterProperty.Maker` Inner class for creating instances of OptionalCharacterProperty

  - ### Field Summary

    - ### Fields inherited from class org.apache.fop.fo.properties.Property

      `log`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `char` | `getCharacter()` This method expects to be overridden by subclasses
    `static OptionalCharacterProperty` | `getInstance(Character character)` Get character property instance for character.
    `Object` | `getObject()` This method expects to be overridden by subclasses
    `String` | `getString()` This method expects to be overridden by subclasses.
    `int` | `hashCode()`

    - ### Methods inherited from class org.apache.fop.fo.properties.Property

      `getColor, getCondLength, getEnum, getKeep, getLength, getLengthPair, getLengthRange, getList, getNCname, getNumber, getNumeric, getSpace, getSpecifiedValue, isAuto, setSpecifiedValue, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static OptionalCharacterProperty getInstance(Character character)

      Get character property instance for character.
      Parameters:
        `character` - the character
      Returns:
        the character property instance

    - #### getObject

          public Object getObject()

      Description copied from class: `Property`
      This method expects to be overridden by subclasses
      Overrides:
        `getObject` in class `Property`
      Returns:
        this.character cast as an Object

    - #### getCharacter

          public char getCharacter()

      Description copied from class: `Property`
      This method expects to be overridden by subclasses
      Overrides:
        `getCharacter` in class `Property`
      Returns:
        this.character

    - #### getString

          public String getString()

      Description copied from class: `Property`
      This method expects to be overridden by subclasses.
      Overrides:
        `getString` in class `Property`
      Returns:
        this.character cast as a String

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2025 Apache Software Foundation. All rights reserved.