class RouteSearch {

    public RouteSearch(final List<? extends Line> loc)
            throws OpenLREncoderProcessingException {
        location = loc;
        if (location == null || location.isEmpty()) {
            throw new OpenLREncoderProcessingException(
                    EncoderProcessingError.ROUTE_CONSTRUCTION_ERROR);
        }
        startLine = location.get(0);
        destLine = location.get(location.size() - 1);
        for (int routeIndex = 0; routeIndex < location.size(); ++routeIndex) {
            lengthBetweenStartAndEndLineAlongLocation += location.get(routeIndex).getLineLength();
        }
        startLoopIndex = checkLoopAtStart();
        endLoopIndex = checkLoopAtEnd();
    }

    public  RouteSearch(final List<? extends Line> loc);

}