code: @Override
      public long getMaxX() {
          if (!excludeOutOfRangeValues) {
              return super.getMaxX();
          } else {
              long retMax = 0;
              Iterator<Long> iter = values.keySet().iterator();
  
              if (iter.hasNext()) {
                  retMax = iter.next();
              }
              long excludeValue = getGranulationValue() * excludeCount;
              while (iter.hasNext()) {
                  long value = iter.next();
  
                  if (value > retMax) {
                      if ((value - retMax) < excludeValue) {
                          retMax = value;
                      }
                  }
              }
              return retMax;
          }
      }
docs: Method used to getMaxX without taking in account out of range
  values. I.E. we don't take in account on value if the distance
  with the last point is greater than getGranulationValue() * excludeCount.
  
  @return the evaluated MaxX