org.opentripplanner.ext.legacygraphqlapi.datafetchers.LegacyGraphQLdebugOutputImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.ext.legacygraphqlapi.datafetchers;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.opentripplanner.api.resource.DebugOutput;
import org.opentripplanner.ext.legacygraphqlapi.generated.LegacyGraphQLDataFetchers;
public class LegacyGraphQLdebugOutputImpl
implements LegacyGraphQLDataFetchers.LegacyGraphQLDebugOutput {
@Override
public DataFetcher totalTime() {
return environment -> getSource(environment).totalTime;
}
@Override
public DataFetcher pathCalculationTime() {
return environment -> getSource(environment).transitRouterTime;
}
@Override
public DataFetcher precalculationTime() {
return environment -> getSource(environment).precalculationTime;
}
@Override
public DataFetcher renderingTime() {
return environment -> getSource(environment).renderingTime;
}
@Override
public DataFetcher timedOut() {
return environment -> false;
}
private DebugOutput getSource(DataFetchingEnvironment environment) {
return environment.getSource();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy