Enum Class DiffFileType

java.lang.Object
java.lang.Enum<DiffFileType>
com.atlassian.bitbucket.content.DiffFileType
All Implemented Interfaces:
Serializable, Comparable<DiffFileType>, Constable

public enum DiffFileType extends Enum<DiffFileType>
An enumeration of file types in a diff.
  • Enum Constant Details

    • FROM

      public static final DiffFileType FROM
      The source ('from') file of the diff.
    • TO

      public static final DiffFileType TO
      The destination ('to') file of the diff,
  • Method Details

    • values

      public static DiffFileType[] 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 DiffFileType 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
    • forSegmentType

      @Nonnull public static DiffFileType forSegmentType(@Nonnull DiffSegmentType segmentType)
      Returns the default file type for a given segmentType.
      Parameters:
      segmentType - segment type to match
      Returns:
      the default matching file type for the provided segment type
      Throws:
      IllegalArgumentException - if there is no file type currently associated with segmentType.
    • fromId

      @Nonnull public static DiffFileType fromId(int id)
    • getId

      public int getId()