Class SoSFEnum<EnumType extends Enum<EnumType> & IntegerValuedEnum>

Direct Known Subclasses:
SoSFBitMask

public class SoSFEnum<EnumType extends Enum<EnumType> & IntegerValuedEnum> extends SoSField
Field containing an enumerated value. A single-value field that contains an enumerated type value, stored as an integer. Nodes that use this field class define mnemonic names for the values. These names should be used when setting or testing the values of the field, even though the values are treated as integers in the methods.

SoSFEnums are written to file as a mnemonic enumerated type name. The name differs among uses of this field in various node or engine classes. See the reference pages for specific nodes or engines for the names (e.g. SoDrawStyle).

See Also:
  • Constructor Details

  • Method Details

    • getValue

      public EnumType getValue(Class<EnumType> enumType)
    • setValue

      public void setValue(EnumType newValue)
      Sets this field to newValue.
    • getValue

      public int getValue()
      Returns this field's value.
    • setValue

      public void setValue(int newValue)
      Sets this field to newValue.
    • setValue

      public void setValue(String name)
      Sets this field to contain the given mnemonic name, passed in as a name or string.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class SoField