Schnittstelle UnaryOperator<T,V>

Typparameter:
T - the keyType of elements maintained by this Collection
V - the keyType of elements maintained by this Collection
Alle Superschnittstellen:
Function<T,V>
Alle bekannten Unterschnittstellen:
Object2ObjectConcurrentMap<T,V>, Object2ObjectMap<T,V>, Object2ObjectNavigableMap<T,V>, Object2ObjectOrderedMap<T,V>, Object2ObjectSortedMap<T,V>
Alle bekannten Implementierungsklassen:
AbstractObject2ObjectMap, Enum2ObjectMap, ImmutableObject2ObjectOpenHashMap, LinkedEnum2ObjectMap, Object2ObjectArrayMap, Object2ObjectAVLTreeMap, Object2ObjectConcurrentOpenHashMap, Object2ObjectLinkedOpenCustomHashMap, Object2ObjectLinkedOpenHashMap, Object2ObjectMaps.EmptyMap, Object2ObjectMaps.SingletonMap, Object2ObjectMaps.SynchronizedMap, Object2ObjectMaps.SynchronizedNavigableMap, Object2ObjectMaps.SynchronizedOrderedMap, Object2ObjectMaps.SynchronizedSortedMap, Object2ObjectMaps.UnmodifyableMap, Object2ObjectMaps.UnmodifyableNavigableMap, Object2ObjectMaps.UnmodifyableOrderedMap, Object2ObjectMaps.UnmodifyableSortedMap, Object2ObjectOpenCustomHashMap, Object2ObjectOpenHashMap, Object2ObjectRBTreeMap
Funktionsschnittstelle:
Dies ist eine funktionale Schnittstelle, die somit als Zuweisungsziel für einen Lambdaausdruck oder eine Methodenreferenz verwendet werden kann.

@FunctionalInterface public interface UnaryOperator<T,V> extends Function<T,V>
A Type Specific Function interface that reduces boxing/unboxing and fills the gaps of interfaces that are missing.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    default <I> UnaryOperator<T,I>
    Returns a composed function that first applies this function to its input, and then applies the after function to the result.
    apply(T k)
    Type Specific get function to reduce boxing/unboxing
    default <I> UnaryOperator<I,V>
    compose(UnaryOperator<I,T> before)
    Returns a composed function that first applies the before function to its input, and then applies this function to the result.
    static <T> UnaryOperator<T,T>
    Creates a Default function that returns the input provided.

    Von Schnittstelle geerbte Methoden java.util.function.Function

    andThen, compose
  • Methodendetails

    • apply

      V apply(T k)
      Type Specific get function to reduce boxing/unboxing
      Angegeben von:
      apply in Schnittstelle Function<T,V>
      Parameter:
      k - the value that should be processed
      Gibt zurück:
      the result of the function
    • identity

      static <T> UnaryOperator<T,T> identity()
      Creates a Default function that returns the input provided.
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Gibt zurück:
      a input returning function
    • compose

      default <I> UnaryOperator<I,V> compose(UnaryOperator<I,T> before)
      Returns a composed function that first applies the before function to its input, and then applies this function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.
      Typparameter:
      I - the keyType of elements maintained by this Collection
      Parameter:
      before - the function that should be used first
      Gibt zurück:
      a composed function with a different starting function.
    • andThen

      default <I> UnaryOperator<T,I> andThen(UnaryOperator<V,I> after)
      Returns a composed function that first applies this function to its input, and then applies the after function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.
      Typparameter:
      I - the keyType of elements maintained by this Collection
      Parameter:
      after - the function that should be used last
      Gibt zurück:
      a composed function with a different starting function.