Class AuditLogChange

java.lang.Object
net.dv8tion.jda.api.audit.AuditLogChange

public class AuditLogChange extends Object
Plain-Old-Java-Object (POJO) representing a single change for an AuditLogEntry!
This object holds the old- and new value for the updated field. The field is specified by the key.
  • Constructor Details

  • Method Details

    • getOldValue

      @Nullable public <T> T getOldValue()
      The previous value for the field specified by getKey().
      Type Parameters:
      T - The expected generic type for this value.
      This will be used to cast the value.
      Returns:
      The old value
      Throws:
      ClassCastException - If the type cast to the generic type fails
    • getNewValue

      @Nullable public <T> T getNewValue()
      The updated value for the field specified by getKey().
      Type Parameters:
      T - The expected generic type for this value.
      This will be used to cast the value.
      Returns:
      The new value
      Throws:
      ClassCastException - If the type cast to the generic type fails
    • getKey

      @Nonnull public String getKey()
      The key which defines the field that was updated by this change
      Returns:
      The key
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object