Class CalendarItemCentury

java.lang.Object
io.goobi.viewer.model.calendar.AbstractCalendarItem
io.goobi.viewer.model.calendar.CalendarItemCentury
All Implemented Interfaces:
ICalendarItem, Serializable, Comparable<ICalendarItem>

public class CalendarItemCentury extends AbstractCalendarItem implements Serializable

CalendarItemCentury class.

See Also:
  • Constructor Details

    • CalendarItemCentury

      public CalendarItemCentury(String name, int value, int hits)

      Constructor for CalendarItemYear.

      Parameters:
      name - a String object.
      value - a int.
      hits - a int.
    • CalendarItemCentury

      public CalendarItemCentury(Integer century)
  • Method Details

    • getYears

      public List<CalendarItemYear> getYears()

      Getter for the field years.

      Returns:
      a List object.
    • getYear

      public CalendarItemYear getYear(Integer year)
    • addYearHits

      public void addYearHits(Integer year, Integer hits)
      Add the given hits count to the given year within the century, creating a new item in getYears() if necessary. The hits count is both added to the year item and the century itself, so there is no need to additionally call AbstractCalendarItem.addHits(Integer) on the century
      Parameters:
      year - the year of the hits
      hits - the hit count for the given year
    • toString

      public String toString()
      Overrides:
      toString in class Object