Class Tile

java.lang.Object
model.logic.host.data.Tile
All Implemented Interfaces:
Serializable

public class Tile extends Object implements Serializable
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final char
     
    final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    The equals function is used to compare two objects.
    int
    The hashCode function is used to generate a unique hash code for each object.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • score

      public final int score
    • letter

      public final char letter
  • Method Details

    • equals

      public boolean equals(Object o)
      The equals function is used to compare two objects.
      Overrides:
      equals in class Object
      Parameters:
      o - o Compare the current object to another object
      Returns:
      True if the two tiles have the same letter and score
    • hashCode

      public int hashCode()
      The hashCode function is used to generate a unique hash code for each object. This is useful when storing objects in data structures such as HashMaps, where the hashCode of an object can be used to determine its location in the map.
      Overrides:
      hashCode in class Object
      Returns:
      The hashcode of the score and letter