public Freshness freshness(DependencyContext context) { DependencyContext internal = context; Freshness aggregate = Freshness.FRESH; for (int i = 0; i < dependencies.length && aggregate != Freshness.STALE; i++) { Dependency dependency = dependencies[i]; // Make sure that the dependency updates the revalidation list // correctly. Freshness freshness = internal.checkFreshness(dependency); aggregate = aggregate.combine(freshness); } return aggregate; }