double getIntegralValue(Range boundaries) {
		List<Range> valueRanges = new ArrayList<Range>(); 
		
		for (Range range : ranges) {
			if (range.includes(boundaries.getLeft()) 
					|| range.includes(boundaries.getRight())
					|| boundaries.includes(range.getLeft())
					|| boundaries.includes(range.getRight())) 
			{
				valueRanges.add(range);
			}
		}
		
		Double value = 0d;
		
		for (Range range : valueRanges) {
			Long rangeValue = data.get(range);
			
			if (rangeValue == null) {
				continue;
			}
			
			if (boundaries.includes(range)) {
				value += rangeValue;
			} else {
				value += getPartialValue(range, rangeValue, boundaries);
			}
		}
		
		return value;
	}