Enum Class Fields

java.lang.Object
java.lang.Enum<Fields>
org.wpilib.fields.Fields
All Implemented Interfaces:
Serializable, Comparable<Fields>, Constable

public enum Fields extends Enum<Fields>
Built-in FIRST field descriptions.
  • Enum Constant Details

    • FRC_2018_POWER_UP

      public static final Fields FRC_2018_POWER_UP
      2018 FRC Power Up field description.
    • FRC_2019_DEEP_SPACE

      public static final Fields FRC_2019_DEEP_SPACE
      2019 FRC Destination: Deep Space field description.
    • FRC_2020_INFINITE_RECHARGE

      public static final Fields FRC_2020_INFINITE_RECHARGE
      2020 FRC Infinite Recharge field description.
    • FRC_2021_INFINITE_RECHARGE

      public static final Fields FRC_2021_INFINITE_RECHARGE
      2021 FRC Infinite Recharge field description.
    • FRC_2021_BARREL

      public static final Fields FRC_2021_BARREL
      2021 FRC Barrel Racing Path field description.
    • FRC_2021_BOUNCE

      public static final Fields FRC_2021_BOUNCE
      2021 FRC Bounce Path field description.
    • FRC_2021_GALACTIC_SEARCH_A

      public static final Fields FRC_2021_GALACTIC_SEARCH_A
      2021 FRC Galactic Search A field description.
    • FRC_2021_GALACTIC_SEARCH_B

      public static final Fields FRC_2021_GALACTIC_SEARCH_B
      2021 FRC Galactic Search B field description.
    • FRC_2021_SLALOM

      public static final Fields FRC_2021_SLALOM
      2021 FRC Slalom Path field description.
    • FRC_2022_RAPID_REACT

      public static final Fields FRC_2022_RAPID_REACT
      2022 FRC Rapid React field description.
    • FRC_2023_CHARGED_UP

      public static final Fields FRC_2023_CHARGED_UP
      2023 FRC Charged Up field description.
    • FRC_2024_CRESCENDO

      public static final Fields FRC_2024_CRESCENDO
      2024 FRC Crescendo field description.
    • FTC_2024_2025_INTO_THE_DEEP

      public static final Fields FTC_2024_2025_INTO_THE_DEEP
      2024-2025 FTC Into The Deep field description.
    • FRC_2025_REEFSCAPE_WELDED

      public static final Fields FRC_2025_REEFSCAPE_WELDED
      2025 FRC Reefscape Welded field description.
    • FRC_2025_REEFSCAPE_ANDY_MARK

      public static final Fields FRC_2025_REEFSCAPE_ANDY_MARK
      2025 FRC Reefscape AndyMark field description.
    • FTC_2025_2026_DECODE

      public static final Fields FTC_2025_2026_DECODE
      2025-2026 FTC DECODE field description.
    • FRC_2026_REBUILT_WELDED

      public static final Fields FRC_2026_REBUILT_WELDED
      2026 FRC Rebuilt Welded field description.
    • FRC_2026_REBUILT_ANDY_MARK

      public static final Fields FRC_2026_REBUILT_ANDY_MARK
      2026 FRC Rebuilt AndyMark field description.
  • Field Details

    • BASE_RESOURCE_DIR

      public static final String BASE_RESOURCE_DIR
      Base resource directory for built-in field JSON and image resources.
      See Also:
    • DEFAULT_FIELD

      public static final Fields DEFAULT_FIELD
      Alias to the current game.
    • name

      public final String name
      Human-readable field name.
    • season

      public final String season
      Field season.
    • game

      public final String game
      Game name.
    • fieldImage

      public final String fieldImage
      Field image path relative to BASE_RESOURCE_DIR, or null if none exists.
    • top

      public final int top
      Top field boundary in image pixels.
    • left

      public final int left
      Left field boundary in image pixels.
    • bottom

      public final int bottom
      Bottom field boundary in image pixels.
    • length

      public final double length
      Field length in meters.
    • width

      public final double width
      Field width in meters.
    • program

      public final String program
      FIRST program.
    • resourceFile

      public final String resourceFile
      The JSON resource path relative to BASE_RESOURCE_DIR.
    • hasImage

      public final boolean hasImage
      True if this field has field image metadata.
    • hasTags

      public final boolean hasTags
      True if this field has tag metadata.
  • Method Details

    • values

      public static Fields[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Fields valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getImageResource

      public String getImageResource()
      Returns the image resource path for this field.
      Returns:
      The image resource path, or null if this field has no image.
    • getJson

      public String getJson()
      Returns the original JSON resource contents for this field.
      Returns:
      The JSON resource contents for this field.
    • loadField

      public Field loadField()
      Loads this built-in field.
      Returns:
      The built-in field.