code: private Long[] checkLocation(Location location) {
  		Long[] positions = new Long[2];
  		if (location.isComplement()) {
  			positions[0] = location.getEndPosition();
  			positions[1] = location.getBeginPosition();
  		} else {
  			positions[0] = location.getBeginPosition();
  			positions[1] = location.getEndPosition();
  		}
  		return positions;
  	}
docs: Checks and swaps positions if in wrong order.
  
  @param location location to be checked
  @return an array of positions (in proper order)