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

org.apache.fop.traits

## Class TraitEnum

- java.lang.Object
- - org.apache.fop.traits.TraitEnum

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    BorderStyle, Direction, RuleStyle, Visibility, WritingMode

      public abstract class TraitEnum
      extends Object
      implements Serializable

  Base class for enumeration classes representing traits.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TraitEnum(String name, int enumValue)` Constructor to add a new named item.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getEnumValue()` Returns the enumeration value (one of `Constants`.EN_*).
    `String` | `getName()` Returns the name of the enumeration.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TraitEnum

          protected TraitEnum(String name,
                              int enumValue)

      Constructor to add a new named item.
      Parameters:
        `name` - Name of the item.
        `enumValue` - the `Constants`.EN_* value

  - ### Method Detail

    - #### getName

          public String getName()

      Returns the name of the enumeration.
      Returns:
        the name of the enumeration

    - #### getEnumValue

          public int getEnumValue()

      Returns the enumeration value (one of `Constants`.EN_*).
      Returns:
        the enumeration value

Copyright © 2025 Apache Software Foundation. All rights reserved.