Record Class CoroutineContextElement

java.lang.Object
java.lang.Record
ru.tinkoff.kora.common.util.CoroutineContextElement
All Implemented Interfaces:
kotlin.coroutines.CoroutineContext, kotlin.coroutines.CoroutineContext.Element

public record CoroutineContextElement(Context value) extends Record implements kotlin.coroutines.CoroutineContext.Element
  • Nested Class Summary

    Nested classes/interfaces inherited from interface kotlin.coroutines.CoroutineContext

    kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext.Key<E extends kotlin.coroutines.CoroutineContext.Element>

    Nested classes/interfaces inherited from interface kotlin.coroutines.CoroutineContext.Element

    kotlin.coroutines.CoroutineContext.Element.DefaultImpls
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final kotlin.coroutines.CoroutineContext.Key<CoroutineContextElement>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a CoroutineContextElement record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    <R> R
    fold(R r, kotlin.jvm.functions.Function2<? super R,? super kotlin.coroutines.CoroutineContext.Element,? extends R> function2)
     
    <E extends kotlin.coroutines.CoroutineContext.Element>
    E
    get(kotlin.coroutines.CoroutineContext.Key<E> key)
     
    kotlin.coroutines.CoroutineContext.Key<?>
     
    final int
    Returns a hash code value for this object.
    kotlin.coroutines.CoroutineContext
    minusKey(kotlin.coroutines.CoroutineContext.Key<?> key)
     
    kotlin.coroutines.CoroutineContext
    plus(kotlin.coroutines.CoroutineContext coroutineContext)
     
    final String
    Returns a string representation of this record class.
    Returns the value of the value record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • CoroutineContextElement

      public CoroutineContextElement(Context value)
      Creates an instance of a CoroutineContextElement record class.
      Parameters:
      value - the value for the value record component
  • Method Details

    • getKey

      @Nonnull public kotlin.coroutines.CoroutineContext.Key<?> getKey()
      Specified by:
      getKey in interface kotlin.coroutines.CoroutineContext.Element
    • fold

      public <R> R fold(R r, @Nonnull kotlin.jvm.functions.Function2<? super R,? super kotlin.coroutines.CoroutineContext.Element,? extends R> function2)
      Specified by:
      fold in interface kotlin.coroutines.CoroutineContext
      Specified by:
      fold in interface kotlin.coroutines.CoroutineContext.Element
    • get

      @Nullable public <E extends kotlin.coroutines.CoroutineContext.Element> E get(@Nonnull kotlin.coroutines.CoroutineContext.Key<E> key)
      Specified by:
      get in interface kotlin.coroutines.CoroutineContext
      Specified by:
      get in interface kotlin.coroutines.CoroutineContext.Element
    • minusKey

      @Nonnull public kotlin.coroutines.CoroutineContext minusKey(@Nonnull kotlin.coroutines.CoroutineContext.Key<?> key)
      Specified by:
      minusKey in interface kotlin.coroutines.CoroutineContext
      Specified by:
      minusKey in interface kotlin.coroutines.CoroutineContext.Element
    • plus

      @Nonnull public kotlin.coroutines.CoroutineContext plus(@Nonnull kotlin.coroutines.CoroutineContext coroutineContext)
      Specified by:
      plus in interface kotlin.coroutines.CoroutineContext
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • value

      public Context value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component