public ConstructionHeuristicForager buildForager(HeuristicConfigPolicy configPolicy) {
        ConstructionHeuristicPickEarlyType pickEarlyType_;
        if (pickEarlyType == null) {
            pickEarlyType_ = configPolicy.getScoreDirectorFactory().getInitializingScoreTrend().isOnlyDown()
                    ? ConstructionHeuristicPickEarlyType.FIRST_NON_DETERIORATING_SCORE : ConstructionHeuristicPickEarlyType.NEVER;
        } else {
            if ((pickEarlyType == ConstructionHeuristicPickEarlyType.FIRST_FEASIBLE_SCORE
                    || pickEarlyType == ConstructionHeuristicPickEarlyType.FIRST_FEASIBLE_SCORE_OR_NON_DETERIORATING_HARD)
                    && !(configPolicy.getScoreDefinition() instanceof FeasibilityScoreDefinition)) {
                throw new IllegalArgumentException("The pickEarlyType (" + pickEarlyType
                        + ") is not compatible with the scoreDefinition (" + configPolicy.getScoreDefinition() + ").");

            }
            pickEarlyType_ = pickEarlyType;
        }
        return new DefaultConstructionHeuristicForager(pickEarlyType_);
    }
public ConstructionHeuristicForager buildForager(HeuristicConfigPolicy configPolicy) {
        ConstructionHeuristicPickEarlyType pickEarlyType_;
        if (pickEarlyType == null) {
            pickEarlyType_ = configPolicy.getScoreDirectorFactory().getInitializingScoreTrend().isOnlyDown()
                    ? ConstructionHeuristicPickEarlyType.FIRST_NON_DETERIORATING_SCORE : ConstructionHeuristicPickEarlyType.NEVER;
        } else {
            if ((pickEarlyType == ConstructionHeuristicPickEarlyType.FIRST_FEASIBLE_SCORE
                    || pickEarlyType == ConstructionHeuristicPickEarlyType.FIRST_FEASIBLE_SCORE_OR_NON_DETERIORATING_HARD)
                    && !(configPolicy.getScoreDefinition() instanceof FeasibilityScoreDefinition)) {
                throw new IllegalArgumentException("The pickEarlyType (" + pickEarlyType
                        + ") is not compatible with the scoreDefinition (" + configPolicy.getScoreDefinition() + ").");

            }
            pickEarlyType_ = pickEarlyType;
        }
        return new DefaultConstructionHeuristicForager(pickEarlyType_);
    }
public ConstructionHeuristicForager buildForager ( HeuristicConfigPolicy configPolicy ) { ConstructionHeuristicPickEarlyType pickEarlyType_ ; if ( pickEarlyType == null ) { pickEarlyType_ = configPolicy . getScoreDirectorFactory ( ) . getInitializingScoreTrend ( ) . isOnlyDown ( ) ? ConstructionHeuristicPickEarlyType . FIRST_NON_DETERIORATING_SCORE : ConstructionHeuristicPickEarlyType . NEVER ; } else { if ( ( pickEarlyType == ConstructionHeuristicPickEarlyType . FIRST_FEASIBLE_SCORE || pickEarlyType == ConstructionHeuristicPickEarlyType . FIRST_FEASIBLE_SCORE_OR_NON_DETERIORATING_HARD ) && ! ( configPolicy . getScoreDefinition ( ) instanceof FeasibilityScoreDefinition ) ) { throw new IllegalArgumentException ( "The pickEarlyType (" + pickEarlyType + ") is not compatible with the scoreDefinition (" + configPolicy . getScoreDefinition ( ) + ")." ) ; } pickEarlyType_ = pickEarlyType ; } return new DefaultConstructionHeuristicForager ( pickEarlyType_ ) ; }
************************************************************************
************************************************************************