Package com.walkfares.calendar
Class SparseCalendar
java.lang.Object
com.walkfares.calendar.SparseCalendar
- All Implemented Interfaces:
Calendar
public class SparseCalendar extends Object implements Calendar
-
Constructor Summary
Constructors Constructor Description SparseCalendar()
-
Method Summary
Modifier and Type Method Description UTCDate
alignBackwards(UTCDate date)
UTCDate
alignForwards(UTCDate date)
UTCDate
endOfPeriod(Calendar from, UTCDate start)
int
ensureIndex(UTCDate date)
boolean
equals(Object obj)
String
getCode()
List<UTCDate>
getIndexes()
List<UTCDate>
getIntervals(UTCDate from, int number)
List<UTCDate>
getIntervals(UTCDate from, UTCDate to)
String
getName()
String
getType()
boolean
includes(UTCDate date)
boolean
isSparse()
Calendar
newInstance()
UTCDate
nextInterval(UTCDate from)
UTCDate
prevInterval(UTCDate from)
void
setCode(String code)
SparseCalendar
setIndexes(List<UTCDate> indexes)
void
setName(String name)
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.walkfares.calendar.Calendar
getBasis, isIntraday, move, validate
-
Constructor Details
-
SparseCalendar
public SparseCalendar()
-
-
Method Details
-
getCode
-
setCode
-
getName
-
getType
-
setName
-
getIndexes
-
setIndexes
-
isSparse
public boolean isSparse() -
ensureIndex
- Specified by:
ensureIndex
in interfaceCalendar
- Returns:
- -1 = doesn't align, 0 = standard align, 1 = insert align
-
getIntervals
- Specified by:
getIntervals
in interfaceCalendar
-
getIntervals
- Specified by:
getIntervals
in interfaceCalendar
-
nextInterval
- Specified by:
nextInterval
in interfaceCalendar
-
prevInterval
- Specified by:
prevInterval
in interfaceCalendar
-
alignBackwards
- Specified by:
alignBackwards
in interfaceCalendar
-
alignForwards
- Specified by:
alignForwards
in interfaceCalendar
-
includes
-
newInstance
- Specified by:
newInstance
in interfaceCalendar
-
endOfPeriod
- Specified by:
endOfPeriod
in interfaceCalendar
-
equals
-