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 boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
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 theproperty
record component.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.Methods inherited from interface io.jstach.rainbowgum.LogProperty.PropertyValue
override
Methods inherited from interface io.jstach.rainbowgum.LogProperty.Result
get, optional, value, valueOrNull
Methods 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.Success
Original property key where the value was derived from or was passed a fallback.- Specified by:
key
in interfaceLogProperty.Result.Success<T>
- Returns:
- key.
-
map
Description copied from interface:LogProperty.Result
Map a result- Specified by:
map
in interfaceLogProperty.PropertyValue<T>
- Specified by:
map
in interfaceLogProperty.Result<T>
- Type Parameters:
U
- result type- Parameters:
mapper
- mapping function.- Returns:
- mapped result.
-
describe
Description copied from interface:LogProperty.Result
A description of the result for error messages.- Specified by:
describe
in 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 theproperty
record component.- Returns:
- the value of the
property
record component
-
value
Returns the value of thevalue
record component.- Specified by:
value
in interfaceLogProperty.PropertyValue<T>
- Specified by:
value
in interfaceLogProperty.Result<T>
- Specified by:
value
in interfaceLogProperty.Result.Success<T>
- Returns:
- the value of the
value
record component
-