Module io.jstach.rainbowgum
Package io.jstach.rainbowgum
Record Class LogProperty.Result.Success.PropertySuccess<T>
java.lang.Object
java.lang.Record
io.jstach.rainbowgum.LogProperty.Result.Success.PropertySuccess<T>
- Type Parameters:
T- property type.- Record Components:
property- found property.value- actual value.
- All Implemented Interfaces:
LogProperty.PropertyValue<T>,LogProperty.RequiredResult<T>,LogProperty.Result<T>,LogProperty.Result.Success<T>,Supplier<LogProperty.Result<T>>
- Enclosing interface:
LogProperty.Result.Success<T>
public static record LogProperty.Result.Success.PropertySuccess<T>(LogProperties.FoundProperty property, T value)
extends Record
implements LogProperty.Result.Success<T>
A property that is present.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jstach.rainbowgum.LogProperty.Result
LogProperty.Result.Error<T>, LogProperty.Result.Missing<T>, LogProperty.Result.Success<T>Nested classes/interfaces inherited from interface io.jstach.rainbowgum.LogProperty.Result.Success
LogProperty.Result.Success.PropertySuccess<T>, LogProperty.Result.Success.ValueSuccess<T> -
Constructor Summary
ConstructorsConstructorDescriptionPropertySuccess(LogProperties.FoundProperty property, T value) Successfully found property value. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()A description of the result for error messages.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Original property key where the value was derived from or was passed a fallback.<U> LogProperty.Result<U> map(LogProperty.PropertyFunction<T, U, ? super Exception> mapper) Map a resultproperty()Returns the value of thepropertyrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.Methods inherited from interface io.jstach.rainbowgum.LogProperty.PropertyValue
overrideMethods inherited from interface io.jstach.rainbowgum.LogProperty.Result
get, optional, value, valueOrNullMethods inherited from interface io.jstach.rainbowgum.LogProperty.Result.Success
or, or, value, valueOrNull
-
Constructor Details
-
PropertySuccess
Successfully found property value.- Parameters:
property- found property.value- actual value should not benull.
-
-
Method Details
-
key
Description copied from interface:LogProperty.Result.SuccessOriginal property key where the value was derived from or was passed a fallback.- Specified by:
keyin interfaceLogProperty.Result.Success<T>- Returns:
- key.
-
map
Description copied from interface:LogProperty.ResultMap a result- Specified by:
mapin interfaceLogProperty.PropertyValue<T>- Specified by:
mapin interfaceLogProperty.Result<T>- Type Parameters:
U- result type- Parameters:
mapper- mapping function.- Returns:
- mapped result.
-
describe
Description copied from interface:LogProperty.ResultA description of the result for error messages.- Specified by:
describein interfaceLogProperty.Result<T>- Returns:
- description.
-
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
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). -
property
Returns the value of thepropertyrecord component.- Returns:
- the value of the
propertyrecord component
-
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceLogProperty.PropertyValue<T>- Specified by:
valuein interfaceLogProperty.Result<T>- Specified by:
valuein interfaceLogProperty.Result.Success<T>- Returns:
- the value of the
valuerecord component
-