Created
January 31, 2012 08:04
-
-
Save tbje/1709420 to your computer and use it in GitHub Desktop.
TestData
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.scalatrain | |
object TestData { | |
val List(munich, nuremberg, essen, cologne) = | |
List("Munich", "Nuremberg", "Essen", "Cologne") map { Station(_) } | |
val (t722, t724) = ("722", "724") | |
val times: Map[String, Map[Station, Time]] = Map( | |
t722 -> Map( | |
munich -> Time(8, 30), | |
nuremberg -> Time(9), | |
essen -> Time(10, 45)), | |
t724 -> Map( | |
munich -> Time(6, 30), | |
nuremberg -> Time(7, 30), | |
cologne -> Time(10))) | |
val ice722 = Train("ICE", t722, times(t722) map { _.swap } toSeq sortBy { _._1.asMinutes }) | |
val ice724 = Train("ICE", t724, times(t724) map { _.swap } toSeq sortBy { _._1.asMinutes }) | |
val planner = new JourneyPlanner(Set(ice722, ice724)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment