Package nl.topicus.onderwijs.dashboard.datatypes.train

Examples of nl.topicus.onderwijs.dashboard.datatypes.train.Train


      List<Train> newTrains = new ArrayList<Train>();
      List<Element> tableRows = source.getAllElements(HTMLElementName.TR);
      for (Element tableRow : tableRows) {
        if (tableRow.getParentElement().getName().equals(
            HTMLElementName.TBODY)) {
          Train train = new Train();
          int index = 0;
          for (Element curCell : tableRow.getChildElements()) {
            String contents = curCell.getTextExtractor().toString();
            switch (index) {
            case TIME:
View Full Code Here


      private List<Train> createRandomTrains() {
        Random random = new Random();
        List<Train> ret = new ArrayList<Train>();
        for (int count = 0; count < 10; count++) {
          Train train = new Train();
          train.setType(TrainType.values()[random.nextInt(TrainType
              .values().length)]);
          train.setDestination("random random random centraal");
          int minute = random.nextInt(60);
          train.setDepartureTime(random.nextInt(24) + ":"
              + (minute < 10 ? "0" : "") + minute);
          train.setDelay(random.nextInt(10));
          train.setPlatform(Integer.toString(random.nextInt(10)));
          ret.add(train);
        }
        Collections.sort(ret, new Comparator<Train>() {
          @Override
          public int compare(Train o1, Train o2) {
View Full Code Here

TOP

Related Classes of nl.topicus.onderwijs.dashboard.datatypes.train.Train

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.