public class TimeLocation extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TimeLocation.IntEnumeration |
Constructor and Description |
---|
TimeLocation(int dayCode,
int startTime,
int length,
int pref,
double normPref,
int datePatternPreference,
Long datePatternId,
String datePatternName,
BitSet weekCode,
int breakTime)
Constructor
|
TimeLocation(int dayCode,
int startTime,
int length,
int pref,
double normPref,
Long datePatternId,
String datePatternName,
BitSet weekCode,
int breakTime) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getBreakTime() |
Long |
getDatePatternId() |
String |
getDatePatternName() |
int |
getDatePatternPreference() |
int |
getDayCode()
Days (combination of 1 for Monday, 2 for Tuesday, ...)
|
String |
getDayHeader()
Days for printing purposes
|
TimeLocation.IntEnumeration |
getDays()
Days
|
int[] |
getDaysArray() |
String |
getEndTimeHeader()
End time for printing purposes
|
String |
getEndTimeHeaderNoAdj()
End time for printing purposes
|
int |
getFirstMeeting(int dayOfWeekOffset) |
int |
getLength()
Length
|
String |
getLongName() |
String |
getLongNameNoAdj() |
String |
getName()
Text representation
|
double |
getNormalizedPreference()
Normalized preference
|
int |
getNrMeetings()
Number of meetings
|
int |
getNrSlotsPerMeeting()
Length
|
int |
getNrWeeks() |
int |
getNrWeeks(int startDay,
int endDay) |
int |
getPreference()
Preference
|
TimeLocation.IntEnumeration |
getSlots()
Used slots
|
int |
getStartSlot()
Start slot
|
TimeLocation.IntEnumeration |
getStartSlots()
Used start slots (for each meeting)
|
String |
getStartTimeHeader()
Start time for printing purposes
|
Long |
getTimePatternId()
Time pattern model (can be null)
|
BitSet |
getWeekCode() |
boolean |
hasDay(int day) |
int |
hashCode() |
boolean |
hasIntersection(TimeLocation anotherLocation)
true if overlap
|
int |
nrSharedDays(TimeLocation anotherLocation)
number of overlapping days
|
int |
nrSharedHours(TimeLocation anotherLocation)
number of overlapping time slots (ignoring days)
|
void |
setBreakTime(int breakTime) |
void |
setDatePattern(Long datePatternId,
String datePatternName,
BitSet weekCode) |
void |
setNormalizedPreference(double normalizedPreference) |
void |
setPreference(int preference) |
void |
setTimePatternId(Long timePatternId) |
boolean |
shareDays(TimeLocation anotherLocation)
true if days overlap
|
boolean |
shareHours(TimeLocation anotherLocation)
true if hours overlap
|
boolean |
shareWeeks(BitSet weekCode)
true if weeks overlap
|
boolean |
shareWeeks(TimeLocation anotherLocation)
true if weeks overlap
|
String |
toString() |
public TimeLocation(int dayCode, int startTime, int length, int pref, double normPref, int datePatternPreference, Long datePatternId, String datePatternName, BitSet weekCode, int breakTime)
dayCode
- days (combination of 1 for Monday, 2 for Tuesday, ...)startTime
- start slotlength
- number of slotspref
- time preferencepublic TimeLocation(int dayCode, int startTime, int length, int pref, double normPref, Long datePatternId, String datePatternName, BitSet weekCode, int breakTime)
public int getNrMeetings()
public int getBreakTime()
public void setBreakTime(int breakTime)
public int getDayCode()
public String getDayHeader()
public String getStartTimeHeader()
public String getEndTimeHeader()
public String getEndTimeHeaderNoAdj()
public int getStartSlot()
public boolean shareDays(TimeLocation anotherLocation)
public int nrSharedDays(TimeLocation anotherLocation)
public boolean shareHours(TimeLocation anotherLocation)
public int nrSharedHours(TimeLocation anotherLocation)
public boolean shareWeeks(TimeLocation anotherLocation)
public boolean shareWeeks(BitSet weekCode)
public boolean hasDay(int day)
public boolean hasIntersection(TimeLocation anotherLocation)
public TimeLocation.IntEnumeration getSlots()
public TimeLocation.IntEnumeration getStartSlots()
public TimeLocation.IntEnumeration getDays()
public int[] getDaysArray()
public String getLongName()
public String getLongNameNoAdj()
public int getPreference()
public void setPreference(int preference)
public int getLength()
public int getNrSlotsPerMeeting()
public double getNormalizedPreference()
public void setNormalizedPreference(double normalizedPreference)
public Long getTimePatternId()
public Long getDatePatternId()
public void setTimePatternId(Long timePatternId)
public BitSet getWeekCode()
public String getDatePatternName()
public void setDatePattern(Long datePatternId, String datePatternName, BitSet weekCode)
public int getDatePatternPreference()
public int getNrWeeks()
public int getNrWeeks(int startDay, int endDay)
public int getFirstMeeting(int dayOfWeekOffset)