public interface

Function<I, O>

 androidx.arch.core.util.Function<I, O>

Subclasses:

QuirkSettingsLoader

Gradle dependencies

compile group: 'androidx.arch.core', name: 'core-common', version: '2.2.0'

  • groupId: androidx.arch.core
  • artifactId: core-common
  • version: 2.2.0

Artifact androidx.arch.core:core-common:2.2.0 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.arch.core:core-common android.arch.core:common

Androidx class mapping:

androidx.arch.core.util.Function android.arch.core.util.Function

Overview

Represents a function.

Summary

Methods
public java.lang.Objectapply(java.lang.Object input)

Applies this function to the given input.

Methods

public java.lang.Object apply(java.lang.Object input)

Applies this function to the given input.

Parameters:

input: the input

Returns:

the function result.

Source

/*
 * Copyright 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.arch.core.util;

/**
 * Represents a function.
 *
 * @param <I> the type of the input to the function
 * @param <O> the type of the output of the function
 */
public interface Function<I, O> {
    /**
     * Applies this function to the given input.
     *
     * @param input the input
     * @return the function result.
     */
    O apply(I input);
}