code: private boolean checkLocations(long length, CompoundLocation<Location> locations) {
          for(Location location : locations.getLocations()){
          	if(location instanceof RemoteLocation)
          		continue;
              if(location.getIntBeginPosition() == null || 
                      location.getIntBeginPosition() < 0){
                  return false;
              }
              if(location.getIntEndPosition() == null ||
                      location.getIntEndPosition() > length){
                  return false;
              }
          }
          return true;
      }
docs: Checks that the locations are within the sequence length
  @param length
  @param locations
  @return