Package io.goobi.viewer.model.calendar
Class AbstractCalendarItem
java.lang.Object
io.goobi.viewer.model.calendar.AbstractCalendarItem
- All Implemented Interfaces:
ICalendarItem
,Comparable<ICalendarItem>
- Direct Known Subclasses:
CalendarItemCentury
,CalendarItemDay
,CalendarItemMonth
,CalendarItemWeek
,CalendarItemYear
Abstract AbstractCalendarItem class.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
No-arg constructor.protected
AbstractCalendarItem
(String name, int value, int hits) Constructor for AbstractCalendarItem. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.goobi.viewer.model.calendar.ICalendarItem
compareTo
-
Field Details
-
name
-
value
protected int value -
hits
protected int hits -
selected
protected boolean selected
-
-
Constructor Details
-
AbstractCalendarItem
protected AbstractCalendarItem()No-arg constructor. -
AbstractCalendarItem
Constructor for AbstractCalendarItem.
- Parameters:
name
- aString
object.value
- a int.hits
- a int.
-
-
Method Details
-
getName
getName.
- Specified by:
getName
in interfaceICalendarItem
- Returns:
- a
String
object.
-
getValue
public int getValue()getValue.
- Specified by:
getValue
in interfaceICalendarItem
- Returns:
- a int.
-
getFormattedValue
Returns a two-digit string representation of this item's value.- Returns:
- a
String
object.
-
getHits
public int getHits()getHits.
- Specified by:
getHits
in interfaceICalendarItem
- Returns:
- a int.
-
setHits
public void setHits(int hits) setHits.
- Specified by:
setHits
in interfaceICalendarItem
- Parameters:
hits
- a int.
-
isSelected
public boolean isSelected()isSelected.
- Specified by:
isSelected
in interfaceICalendarItem
- Returns:
- a boolean.
-
setSelected
public void setSelected(boolean selected) setSelected.
- Specified by:
setSelected
in interfaceICalendarItem
- Parameters:
selected
- a boolean.
-
isEmpty
public boolean isEmpty() -
addHits
-