Package com.it.loratek.sski.parser

Examples of com.it.loratek.sski.parser.TimeToken


    /* creazione dei time token, divisione per 5 minuti */
   
    ArrayList<TimeToken> lista = new ArrayList<TimeToken>();
    for (int i = 0; i < data.getTotalTokens(); i++) {
      TimeToken q = new TimeToken();
      q.setOrd(i);
      lista.add(q);
    }
    // metto ogni skier nel token giusto leggendo il primo tempo
    for (int j = 0; j < data.getSkiersList().size(); j++) {
      Skier skier = data.getSkiersList().get(j);
      double fr = Double.parseDouble(skier.getFrame().get(0));
      int n = (int) fr / 15000;
      TimeToken token = lista.get(n);
      token.getList().add(skier);
      if(skier.hasStopped())token.increseHasStopped();
    }
    for (int i = 0; i < data.getTotalTokens(); i++) {
      lista.get(i).setMedSpeed(calcMedSpeed(lista.get(i).getList()));
      lista.get(i).setSkiers(lista.get(i).getList().size());
    }
View Full Code Here


          for (MatchData elem : list) {

            reg[i] = new int[elem.getTimeTokenListList().size()];
            for (int j = 0; j < parser.getTimeTokenListList()
                .size(); j++) {
              TimeToken token = elem.getTimeTokenListList()
                  .get(j);
              reg[i][j] = token.getSkiers();
            }
            i++;
          }
          return reg;
        }
View Full Code Here

          MatchData dataz = new MatchData(id);

          ArrayList<TimeToken> tokenlist = new ArrayList<TimeToken>();
          for (int i = 0; i < tokens; i++) {
            TimeToken q = new TimeToken();
            q.setOrd(i);
            tokenlist.add(q);
          }
          // metto ogni skier nel token giusto leggendo il primo tempo
          for (int j = 0; j < skierlist.size(); j++) {
            Skier skier = skierlist.get(j);
            double fr = Double.parseDouble(skier.getFrame().get(0));
            int n = (int) (fr / tokensize);
            TimeToken token = tokenlist.get(n);
            token.getList().add(skier);
            if (skier.hasStopped())
              token.increseHasStopped();
          }
          for (int i = 0; i < tokens; i++) {
            tokenlist.get(i).setMedSpeed(
                calcMedSpeed(tokenlist.get(i).getList()));
            tokenlist.get(i).setSkiers(
View Full Code Here

TOP

Related Classes of com.it.loratek.sski.parser.TimeToken

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.