Package io.goobi.viewer.model.calendar
Class CalendarItemCentury
java.lang.Object
io.goobi.viewer.model.calendar.AbstractCalendarItem
io.goobi.viewer.model.calendar.CalendarItemCentury
- All Implemented Interfaces:
ICalendarItem,Serializable,Comparable<ICalendarItem>
CalendarItemCentury class.
- See Also:
-
Field Summary
Fields inherited from class io.goobi.viewer.model.calendar.AbstractCalendarItem
hits, name, selected, value -
Constructor Summary
ConstructorsConstructorDescriptionCalendarItemCentury(Integer century) CalendarItemCentury(String name, int value, int hits) Constructor for CalendarItemYear. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddYearHits(Integer year, Integer hits) Add the given hits count to the given year within the century, creating a new item ingetYears()if necessary.getYears()Getter for the fieldyears.toString()Methods inherited from class io.goobi.viewer.model.calendar.AbstractCalendarItem
addHits, getFormattedValue, getHits, getName, getValue, isEmpty, isSelected, setHits, setSelectedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.goobi.viewer.model.calendar.ICalendarItem
compareTo
-
Constructor Details
-
CalendarItemCentury
Constructor for CalendarItemYear.
- Parameters:
name- aStringobject.value- a int.hits- a int.
-
CalendarItemCentury
-
-
Method Details
-
getYears
Getter for the field
years.- Returns:
- a
Listobject.
-
getYear
-
addYearHits
Add the given hits count to the given year within the century, creating a new item ingetYears()if necessary. The hits count is both added to the year item and the century itself, so there is no need to additionally callAbstractCalendarItem.addHits(Integer)on the century- Parameters:
year- the year of the hitshits- the hit count for the given year
-
toString
-