Ejemplo n.º 1
0
  private List<OutPutScreen> getFinalOutPutScreen(List<OutPutScreen> outPutScreens) {

    boolean isScoreZero = false;
    for (OutPutScreen outPutScreen : outPutScreens) {
      System.out.println("Score");
      outPutScreen.setScore(outPutScreen.getInternalScore() + outPutScreen.getExternalScore());
      if (outPutScreen.getScore() == 0) {
        isScoreZero = true;
      }
    }

    if (isScoreZero) {
      return outPutScreens.subList(0, outPutScreens.size() > 5 ? 5 : outPutScreens.size());
    } else {
      List<OutPutScreen> list = new ArrayList<OutPutScreen>();
      for (OutPutScreen outPutScreen : outPutScreens) {
        if (outPutScreen.getInternalScore() == 1 && outPutScreen.getScore() == 1) {
          list.add(outPutScreen);
        }
        if (outPutScreen.getExternalScore() == 1 && outPutScreen.getScore() == 1) {
          list.add(outPutScreen);
        }
      }
      return list;
    }
  }
Ejemplo n.º 2
0
  private List<OutPutScreen> getScoringSystemForOutPutScreen(List<OutPutScreen> outPutScreens) {
    List<OutPutScreen> outPutScreenList = new ArrayList<OutPutScreen>();
    for (OutPutScreen outPutScreen : outPutScreens) {
      outPutScreen.setInternalScore(calculateInternalScore(outPutScreen));
      outPutScreen.setExternalScore(calculateExternalScore(outPutScreen));
      outPutScreen.setScore(outPutScreen.getInternalScore() + outPutScreen.getExternalScore());
      outPutScreen.setPriority(setPriority(outPutScreen));
      outPutScreenList.add(outPutScreen);
    }

    return outPutScreenList;
  }
Ejemplo n.º 3
0
  private List<OutPutScreen> getOnlyInternalReinforcementOptions(List<OutPutScreen> outPutScreens) {

    List<OutPutScreen> outPutScreenForInternalReinforcementOnly = new ArrayList<OutPutScreen>();
    for (OutPutScreen outPutScreen : outPutScreens) {

      if (outPutScreen.isInternalReinforcement()
          || outPutScreen.isInternalBothSide()
          || outPutScreen.isJtrForSideOne()
          || outPutScreen.isJtrForSideTwo()) {
        outPutScreen.setScore(outPutScreen.getInternalScore());
        outPutScreenForInternalReinforcementOnly.add(outPutScreen);
      }
    }

    return outPutScreenForInternalReinforcementOnly;
  }