StyleClass (JavaFX 25)
Description: declaration: module: javafx.graphics, package: javafx.css, class: StyleClass

# Class StyleClass

java.lang.Object
javafx.css.StyleClass

public final class StyleClass extends Object
A class that contains `StyleClass` information.

Since:
  9

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StyleClass(String styleClassName, int index)`
  Constructs a `StyleClass` object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getIndex()`
  Returns the index of this `StyleClass` in the styleClasses list.
  `String`
  `getStyleClassName()`
  Returns the name of `StyleClass`.
  `String`
  `toString()`
  Returns the name of `StyleClass`.

  ### Methods declared in class Object

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

- ## Constructor Details

  - ### StyleClass

    public StyleClass(String styleClassName, int index)
    Constructs a `StyleClass` object.
    Parameters:
      `styleClassName` - name of the style class
      `index` - style class index

- ## Method Details

  - ### getStyleClassName

    public String getStyleClassName()
    Returns the name of `StyleClass`.
    Returns:
      the name of `StyleClass`

  - ### toString

    public String toString()
    Returns the name of `StyleClass`.
    Overrides:
      `toString` in class `Object`
    Returns:
      the name of `StyleClass`

  - ### getIndex

    public int getIndex()
    Returns the index of this `StyleClass` in the styleClasses list.
    Returns:
      index