sdk-common / com.tomtom.online.sdk.common.functional

Package com.tomtom.online.sdk.common.functional

Types

BuildConfig

class BuildConfig

CheckedFunction1

interface CheckedFunction1<A : Any!, R : Any!>

Represents a function with a single argument that can throw a checked exception.

CheckedSupplier

interface CheckedSupplier<R : Any!>

Represents base interface for all functions and function-like objects that return a value and have no arguments. The main difference between this interface and Supplier is that this interface allows its implementations to throw checked exceptions.

Consumer0

interface Consumer0

Represents base interface for all functions and function-like objects that don't consume a value and don't return a result. Most of the time this interface is used to pass behaviour to some other code, in many cases enclosing in itself the surrounding state and deferring the computation (creating a clojure).

Consumer1

interface Consumer1<T : Any!>

Represents base interface for all functions and function-like objects that consume a value and don't return a result. Most of the time this interface is used to pass behaviour to some other code, in many cases enclosing in itself the surrounding state and deferring the computation (creating a clojure).

Consumer2

interface Consumer2<T : Any!, R : Any!>

Represents a operation that accepts a two input arguments and doesn't return any result.

Consumer3

interface Consumer3<T : Any!, R : Any!, S : Any!>

Represents a operation that accepts a three input arguments and doesn't return any result.

Consumers

class Consumers

A collection of general purpose Consumers implementations.

Function1

interface Function1<A : Any!, R : Any!> : Serializable

Represents a function with a single argument.

Function2

interface Function2<A1 : Any!, A2 : Any!, R : Any!> : Serializable

Represents a function with two arguments. Due to Java semantics and how functions are represented on the JVM, using Function2 might be shorter then using Function1 that returns another Function1 as a result. Still it's possible to convert Function2 into such form.

Iterators

class Iterators

A collection of predefined general-purpose Iterator implementations.

Maybe

abstract class Maybe<A : Any!> : Serializable, MutableIterable<A>

A monadic type representing a result of some computation. It can be a Just or a Nothing. Just contains the computed value, Nothing indicates that result for the computations is unavailable (no other information is passed).

Predicate

interface Predicate<T : Any!>

Represents a predicate (boolean-valued function) of one argument.

Predicates

class Predicates

A collection of predefined general-purpose Predicate implementations.

StringPredicates

class StringPredicates

A collection of predefined string related Predicate implementations.

Supplier

interface Supplier<R : Any!>

Represents base interface for all functions and function-like objects that return a value and have no arguments. Most of the time this interface is used to pass behaviour to some other code, in many cases enclosing in itself the surrounding state and deferring the computation (creating a clojure).

Try

abstract class Try<T : Any!> : Serializable, MutableIterable<T>

A monadic type representing a result of some computation. It can be a Success or a Failure. Success contains the computed value, Failure contains cause of the computation failure in a form of a Throwable.