Gets a function which maps {@code Example}s to their output value.

@return
492320
public static <B> Function<Example<?, B>, B> outputGetter() {
    return new Function<Example<?, B>, B>() {
      @Override
      public B apply(Example<?, B> item) {
        return item.getOutput();
      }
    };
  }
597593
@Deprecated
  public static <K, V> Function<Map.Entry<K, V>, V> getEntryValue() {
    return entryValueFunction();
  }
859187
protected MapBinder<String, MessageOutput.Factory2<? extends MessageOutput>> outputsMapBinder2() {
        return MapBinder.newMapBinder(binder(),
                TypeLiteral.get(String.class),
                new TypeLiteral<MessageOutput.Factory2<? extends MessageOutput>>() {
                });
    }
1286420
function map ( input, inputMin, inputMax, outputMin, outputMax, clamp, ease ) {
    input = ( input - inputMin ) / ( inputMax - inputMin );
    if ( ease ) {
        input = ease(input);
    } 
    var output = input * ( outputMax - outputMin ) + outputMin;
    if ( !!clamp ) {
        if ( outputMax < outputMin ) {
            if ( output < outputMax ) {
                output = outputMax;
            }
            else if ( output > outputMin ) {
                output = outputMin;
            }
        } else {
            if ( output > outputMax ) {
                output = outputMax;
            }
            else if ( output < outputMin ) {
                output = outputMin;
            }
        }
    }
    return output;
}
1148071
public Map<String, String> getParameters() {

        if (m_functionBean == null) {
            return Collections.emptyMap();
        }
        Format format = m_functionBean.getMainFormat();
        CmsDynamicFunctionFormatWrapper wrapper = new CmsDynamicFunctionFormatWrapper(m_cms, format);
        return wrapper.getParameters();
    }
658615
protected MapBinder<String, MessageOutput.Factory<? extends MessageOutput>> outputsMapBinder() {
        return MapBinder.newMapBinder(binder(),
                TypeLiteral.get(String.class),
                new TypeLiteral<MessageOutput.Factory<? extends MessageOutput>>() {
                });
    }
694996
@SuppressWarnings("unchecked")
    public static <D> Mapping<D, String> toStringMapping() {
        return (Mapping<D, String>) TOSTRING_MAPPING;
    }
4299
public static <K, V> Function<Map.Entry<K, V>, V> entryToValueFunction() {
      return EntryToValueFunction.getInstance();
   }
1186686
@Override
  public final Map<String, JSType> getPropertyTypeMap() {
    Map<String, JSType> propTypeMap = new LinkedHashMap<>();
    updatePropertyTypeMap(this, propTypeMap, new HashSet<FunctionType>());
    return propTypeMap;
  }
406469
@GwtIncompatible("Unnecessary")
  private String getMapPath(String outputFile) {
    String basePath = "";

    if (outputFile.isEmpty()) {
      // If we have a js_module_binary rule, output the maps
      // at modulename_props_map.out, etc.
      if (!config.moduleOutputPathPrefix.isEmpty()) {
        basePath = config.moduleOutputPathPrefix;
      } else {
        basePath = "jscompiler";
      }
    } else {
      // Get the path of the output file.
      File file = new File(outputFile);

      String outputFileName = file.getName();

      // Strip the .js from the name.
      if (outputFileName.endsWith(".js")) {
        outputFileName =
            outputFileName.substring(0, outputFileName.length() - 3);
      }

      String fileParent = file.getParent();
      if (fileParent == null) {
        basePath = outputFileName;
      } else {
        basePath = file.getParent() + File.separatorChar + outputFileName;
      }
    }

    return basePath;
  }
249486
public Transform getTransform(String functionName) {
        Function function = Function.fromString(functionName);

        switch (function) {
            case DIVIDE:
                return new MetricReducerOrMappingTransform(new DivideValueReducerOrMapping());
            case SUM:
                return new MetricReducerOrMappingTransform(new SumValueReducerOrMapping());
            case MULTIPLY:
            case SCALE:
                return new MetricReducerOrMappingTransform(new ScaleValueReducerOrMapping());
            case DIFF:
                return new MetricReducerOrMappingTransform(new DiffValueReducerOrMapping());
            case PERCENTILE:
                return new MetricReducerOrMappingWithConstantTransform(new PercentileValueReducerOrMapping());
            case DEVIATION:
                return new MetricReducerOrMappingWithConstantTransform(new DeviationValueReducerOrMapping());
            case AVERAGE:
                return new MetricReducerTransform(new AverageValueReducer());
            case MIN:
                return new MetricReducerTransform(new MinValueReducer());
            case MAX:
                return new MetricReducerTransform(new MaxValueReducer());
            case PROPAGATE:
                return new PropagateTransform();
            case UNION:
                return new MetricUnionTransform(new UnionValueUnionReducer());
            case GROUP:
                return new GroupTransformWrapUnion();
            case COUNT:
                return new CountTransformWrapUnion();
            case SORT:
                return new SortTransformWrapAboveAndBelow();
            case DOWNSAMPLE:
                return new DownsampleTransform();
            case INTEGRAL:
                return new IntegralTransform();
            case JOIN:
                return new JoinTransform();
            case LIMIT:
                return new LimitTransform();
            case RANGE:
                return new RangeTransformWrap();
            case NORMALIZE:
                return new NormalizeTransformWrap();
            case FILL:
                return new FillTransform();
            case FILL_CALCULATE:
                return new FillCalculateTransform();
            case ALIAS:
                return new AliasTransform();
            case ALIASBYTAG:
                return new AliasByTagTransform();
            case INCLUDE:
                return new IncludeTransform();
            case EXCLUDE:
                return new ExcludeTransformWrap();
            case HW_FORECAST:
                return new HoltWintersForecast(_tsdbService);
            case HW_DEVIATION:
                return new HoltWintersDeviation(_tsdbService);
            case IDENTITY:
                return new IdentityTransform();
            case ZEROIFMISSINGSUM:
                return new ZeroIfMissingSum();
            case ABOVE:
                return new MetricFilterWithInteralReducerTransform(new AboveValueFilter());
            case BELOW:
                return new MetricFilterWithInteralReducerTransform(new BelowValueFilter());
            case HIGHEST:
                return new MetricFilterWithInteralReducerTransform(new HighestValueFilter());
            case LOWEST:
                return new MetricFilterWithInteralReducerTransform(new LowestValueFilter());
            case ABSOLUTE:
                return new MetricMappingTransform(new AbsoluteValueMapping());
            case DERIVATIVE:
                return new MetricMappingTransform(new DerivativeValueMapping());
            case CULL_ABOVE:
                return new MetricMappingTransform(new CullAboveValueMapping());
            case CULL_BELOW:
                return new MetricMappingTransform(new CullBelowValueMapping());
            case CONSECUTIVE:
                return new MetricMappingTransform(new ConsecutiveValueMapping());
            case LOG:
                return new MetricMappingTransform(new LogValueMapping());
            case SHIFT:
                return new MetricMappingTransform(new ShiftValueMapping());
            case MOVING:
                return new MetricMappingTransform(new MovingValueMapping());
            case SUM_V:
                return new MetricZipperTransform(new SumValueZipper());
            case SCALE_V:
                return new MetricZipperTransform(new ScaleValueZipper());
            case DIFF_V:
                return new MetricZipperTransform(new DiffValueZipper());
            case DIVIDE_V:
                return new MetricZipperTransform(new DivideValueZipper());
            case NORMALIZE_V:
                return new MetricZipperTransform(new DivideValueZipper());
            case ANOMALY_STL:
                return new AnomalySTLTransform();
            case GROUPBY:
            	return new GroupByTransform(this);
            case GROUPBYTAG:
                return new GroupByTagTransform(this);
            case ANOMALY_DENSITY:
                return new AnomalyDetectionGaussianDensityTransform();
            case ANOMALY_ZSCORE:
                return new AnomalyDetectionGaussianZScoreTransform();
            case ANOMALY_KMEANS:
                return new AnomalyDetectionKMeansTransform();
            case ANOMALY_RPCA:
                return new AnomalyDetectionRPCATransform();
            case INTERPOLATE:
                return new InterpolateTransform();
            default:
                throw new UnsupportedOperationException(functionName);
        } // end switch
    }
1240504
public static <T> BiFunction<String, Map<String, String>, T>
            mkSimpleConverter(Function<String, T> convert) {
        return (name, data) -> convert.apply(data.get(name));
    }
898274
public static <K,V> Function<K,V> map2fun(final Map<K,V> map) {
	return new Function<K,V>() {
	    public V f(K key) {
		V value = map.get(key);
		if(value == null) {
		    throw new Error("No value for " + key);
		}
		return value;
	    }
	};
    }
456069
@Nonnull
    public BiMap<String, String> getOutputMapper() {
        final BiMap<String, String> outputMapper = this.processor.getOutputMapperBiMap();
        if (outputMapper == null) {
            return HashBiMap.create();
        }
        return outputMapper;
    }
1193430
public Tuple mapValues(@NonNull Function<Object, ? extends Object> function) {
      return NTuple.of(Arrays.stream(array()).map(function).collect(Collectors.toList()));
   }
1015080
public static String asString( Example example )
    {
        StringWriter sw = new StringWriter();
        PrintWriter writer = new PrintWriter( sw );
        example.print( writer );
        return sw.toString();
    }
183400
public TimeSeriesMetricDeltaSet map(Function<? super MetricValue, ? extends MetricValue> fn) {
        return values_
                .map(
                        fn,
                        (x) -> x.entrySet().stream().map((entry) -> apply_fn_(entry, fn))
                )
                .mapCombine(TimeSeriesMetricDeltaSet::new, TimeSeriesMetricDeltaSet::new);
    }