Record Class ChangeItem

java.lang.Object
java.lang.Record
dev.reuss.tmdb.common.change.ChangeItem
Record Components:
id - change item id
action - change action
time - change timestamp
iso6391 - ISO 639-1 language code
iso31661 - ISO 3166-1 region code
value - changed value
originalValue - previous value, if provided by the endpoint
All Implemented Interfaces:
TmdbModel, Serializable

public record ChangeItem(String id, String action, String time, String iso6391, String iso31661, Object value, Object originalValue) extends Record implements TmdbModel
Single change item for a TMDB resource field.
See Also:
  • Constructor Details

    • ChangeItem

      public ChangeItem(String id, String action, String time, String iso6391, String iso31661, Object value, Object originalValue)
      Creates an instance of a ChangeItem record class.
      Parameters:
      id - the value for the id record component
      action - the value for the action record component
      time - the value for the time record component
      iso6391 - the value for the iso6391 record component
      iso31661 - the value for the iso31661 record component
      value - the value for the value record component
      originalValue - the value for the originalValue record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • action

      public String action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • time

      public String time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • iso6391

      public String iso6391()
      Returns the value of the iso6391 record component.
      Returns:
      the value of the iso6391 record component
    • iso31661

      public String iso31661()
      Returns the value of the iso31661 record component.
      Returns:
      the value of the iso31661 record component
    • value

      public Object value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • originalValue

      public Object originalValue()
      Returns the value of the originalValue record component.
      Returns:
      the value of the originalValue record component