Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ttsolver.model
Class TimeLocation

    java.lang.Object
      ttsolver.model.TimeLocation

    public class TimeLocation

extends Object

Time part of placement.

Version:
  1.0
Author:
  Tomáš Müller

Constructor Summary
`TimeLocation(int dayCode, int startTime, int length, int pref)` Constructor
`TimeLocation(edu.purdue.smas.timetable.data.pattern.TimePatternModel timePatternModel, int day, int time)` Constructor

Method Summary
`int` | `getDayCode()` Days (combination of 1 for Monday, 2 for Tuesday, ...)
`String` | `getDayHeader()` Days for printing purposes
`String` | `getEndTimeHeader()` End time for printing purposes
`Collection` | `getIntersection(TimeLocation anotherLocation)` Set of overlapping slots
`int` | `getLength()` Length
`edu.purdue.smas.timetable.data.pattern.TimePatternModel` | `getModel()` Time pattern model (can be null)
`double` | `getNormalizedPreference()` Normalized preference
`int` | `getNrHalfHoursPerMeeting()` Length
`int` | `getNrMeetings()` Number of meetings
`int` | `getPreference()` Preference
`int[]` | `getSlots()` Used slots
`int` | `getStartSlot()` Start slot
`int[]` | `getStartSlots()` Used start slots (for each meeting)
`String` | `getStartTimeHeader()` Start time for printing purposes
`String` | `getText()` Text representation
`int` | `getTimeCode()` Used slots in a day (combination of 1..first, 2..second,...)
`int` | `hashCode()`
`boolean` | `hasIntersection(TimeLocation anotherLocation)` true if overlap
`boolean` | `shareDays(TimeLocation anotherLocation)` true if days overlap
`boolean` | `shareHours(TimeLocation anotherLocation)` true if hours overlap
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TimeLocation

    public TimeLocation(edu.purdue.smas.timetable.data.pattern.TimePatternModel timePatternModel,
                        int day,
                        int time)

  Constructor

  Parameters:
    `timePatternModel` - time pattern model
    `day` - day in time pattern model
    `time` - time in time pattern model

### TimeLocation

    public TimeLocation(int dayCode,
                        int startTime,
                        int length,
                        int pref)

  Constructor

  Parameters:
    `dayCode` - days (combination of 1 for Monday, 2 for Tuesday, ...)
    `startTime` - start slot
    `length` - number of slots
    `pref` - time preference

Method Detail

### getNrMeetings

    public int getNrMeetings()

  Number of meetings

### getDayCode

    public int getDayCode()

  Days (combination of 1 for Monday, 2 for Tuesday, ...)

### getDayHeader

    public String getDayHeader()

  Days for printing purposes

### getStartTimeHeader

    public String getStartTimeHeader()

  Start time for printing purposes

### getEndTimeHeader

    public String getEndTimeHeader()

  End time for printing purposes

### getStartSlot

    public int getStartSlot()

  Start slot

### getTimeCode

    public int getTimeCode()

  Used slots in a day (combination of 1..first, 2..second,...)

### shareDays

    public boolean shareDays(TimeLocation anotherLocation)

  true if days overlap

### shareHours

    public boolean shareHours(TimeLocation anotherLocation)

  true if hours overlap

### hasIntersection

    public boolean hasIntersection(TimeLocation anotherLocation)

  true if overlap

### getIntersection

    public Collection getIntersection(TimeLocation anotherLocation)

  Set of overlapping slots

### getSlots

    public int[] getSlots()

  Used slots

### getStartSlots

    public int[] getStartSlots()

  Used start slots (for each meeting)

### getText

    public String getText()

  Text representation

### getPreference

    public int getPreference()

  Preference

### getLength

    public int getLength()

  Length

### getNrHalfHoursPerMeeting

    public int getNrHalfHoursPerMeeting()

  Length

### getNormalizedPreference

    public double getNormalizedPreference()

  Normalized preference

### getModel

    public edu.purdue.smas.timetable.data.pattern.TimePatternModel getModel()

  Time pattern model (can be null)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 Tomáš Müller