Class Record

java.lang.Object
org.grp1.model.Record

public class Record extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private float
    Represents the number of average rating in this record
    private int
    Represents the number of votes for this record
    private String
    Represents the tconst of this record
  • Constructor Summary

    Constructors
    Constructor
    Description
    Record(String tconst, float averageRating, int numVotes)
    Constructor to instantiate record
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    The function to return the average rating of the record
    int
    The function to return the key of the record
    int
    The function to return the number of votes
    The function to get the tconst of the record
    void
    setAverageRating(float averageRating)
    The function to set the average rating of the record
    void
    setNumVotes(int numVotes)
    The function to set the number of votes
    void
    setTconst(String tconst)
    The function to set the tconst of the record

    Methods inherited from class java.lang.Object

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

    • tconst

      private String tconst
      Represents the tconst of this record
    • averageRating

      private float averageRating
      Represents the number of average rating in this record
    • numVotes

      private int numVotes
      Represents the number of votes for this record
  • Constructor Details

    • Record

      public Record(String tconst, float averageRating, int numVotes)
      Constructor to instantiate record
      Parameters:
      tconst - The tconst of the record
      averageRating - The average rating of this record
      numVotes - The number of votes of this record
  • Method Details

    • getKey

      public int getKey()
      The function to return the key of the record
      Returns:
      The key of the record
    • getNumVotes

      public int getNumVotes()
      The function to return the number of votes
      Returns:
      The number of votes of the record
    • setNumVotes

      public void setNumVotes(int numVotes)
      The function to set the number of votes
      Parameters:
      numVotes - The number of votes of the record
    • getAverageRating

      public float getAverageRating()
      The function to return the average rating of the record
      Returns:
      The average rating of the record
    • setAverageRating

      public void setAverageRating(float averageRating)
      The function to set the average rating of the record
      Parameters:
      averageRating - The average rating of the record
    • getTconst

      public String getTconst()
      The function to get the tconst of the record
      Returns:
      The tconst of the record
    • setTconst

      public void setTconst(String tconst)
      The function to set the tconst of the record
      Parameters:
      tconst - The tconst of the record