Package ru.tinkoff.kora.common.util
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
-
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
FieldsModifier and TypeFieldDescriptionstatic final kotlin.coroutines.CoroutineContext.Key<CoroutineContextElement> -
Constructor Summary
ConstructorsConstructorDescriptionCoroutineContextElement(Context value) Creates an instance of aCoroutineContextElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.<R> Rfold(R r, kotlin.jvm.functions.Function2<? super R, ? super kotlin.coroutines.CoroutineContext.Element, ? extends R> function2) <E extends kotlin.coroutines.CoroutineContext.Element>
Eget(kotlin.coroutines.CoroutineContext.Key<E> key) kotlin.coroutines.CoroutineContext.Key<?>getKey()final inthashCode()Returns a hash code value for this object.kotlin.coroutines.CoroutineContextminusKey(kotlin.coroutines.CoroutineContext.Key<?> key) kotlin.coroutines.CoroutineContextplus(kotlin.coroutines.CoroutineContext coroutineContext) final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
KEY
-
-
Constructor Details
-
CoroutineContextElement
Creates an instance of aCoroutineContextElementrecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
getKey
@Nonnull public kotlin.coroutines.CoroutineContext.Key<?> getKey()- Specified by:
getKeyin interfacekotlin.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:
foldin interfacekotlin.coroutines.CoroutineContext- Specified by:
foldin interfacekotlin.coroutines.CoroutineContext.Element
-
get
@Nullable public <E extends kotlin.coroutines.CoroutineContext.Element> E get(@Nonnull kotlin.coroutines.CoroutineContext.Key<E> key) - Specified by:
getin interfacekotlin.coroutines.CoroutineContext- Specified by:
getin interfacekotlin.coroutines.CoroutineContext.Element
-
minusKey
@Nonnull public kotlin.coroutines.CoroutineContext minusKey(@Nonnull kotlin.coroutines.CoroutineContext.Key<?> key) - Specified by:
minusKeyin interfacekotlin.coroutines.CoroutineContext- Specified by:
minusKeyin interfacekotlin.coroutines.CoroutineContext.Element
-
plus
@Nonnull public kotlin.coroutines.CoroutineContext plus(@Nonnull kotlin.coroutines.CoroutineContext coroutineContext) - Specified by:
plusin interfacekotlin.coroutines.CoroutineContext
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-