Record Class ValidationCtx

java.lang.Object
java.lang.Record
com.csse3200.game.cutscene.validators.ValidationCtx
Record Components:
characterIds - A list of String character IDs
backgroundIds - A list of String background IDs
soundIds - A list of String sound IDs
beatIds - A list of String beat IDs
characterPoses - A map of character id's to a Set<String> of their pose IDs

public record ValidationCtx(Set<String> characterIds, Set<String> backgroundIds, Set<String> soundIds, Set<String> beatIds, Map<String,Set<String>> characterPoses) extends Record
Stores important cutscene data to be passed into ActionValidators
  • Constructor Details

    • ValidationCtx

      public ValidationCtx(Set<String> characterIds, Set<String> backgroundIds, Set<String> soundIds, Set<String> beatIds, Map<String,Set<String>> characterPoses)
      Creates an instance of a ValidationCtx record class.
      Parameters:
      characterIds - the value for the characterIds record component
      backgroundIds - the value for the backgroundIds record component
      soundIds - the value for the soundIds record component
      beatIds - the value for the beatIds record component
      characterPoses - the value for the characterPoses 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.
    • characterIds

      public Set<String> characterIds()
      Returns the value of the characterIds record component.
      Returns:
      the value of the characterIds record component
    • backgroundIds

      public Set<String> backgroundIds()
      Returns the value of the backgroundIds record component.
      Returns:
      the value of the backgroundIds record component
    • soundIds

      public Set<String> soundIds()
      Returns the value of the soundIds record component.
      Returns:
      the value of the soundIds record component
    • beatIds

      public Set<String> beatIds()
      Returns the value of the beatIds record component.
      Returns:
      the value of the beatIds record component
    • characterPoses

      public Map<String,Set<String>> characterPoses()
      Returns the value of the characterPoses record component.
      Returns:
      the value of the characterPoses record component