Package io.skodjob.testframe.resources
Record Class ResourceCondition<T extends io.fabric8.kubernetes.api.model.HasMetadata>
java.lang.Object
java.lang.Record
io.skodjob.testframe.resources.ResourceCondition<T>
- Type Parameters:
T- Type of Kubernetes resource.- Record Components:
predicate- predicate functionconditionName- conditionName
public record ResourceCondition<T extends io.fabric8.kubernetes.api.model.HasMetadata>(Predicate<T extends io.fabric8.kubernetes.api.model.HasMetadata> predicate, String conditionName)
extends Record
Represents a condition that can be applied to Kubernetes resources.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceCondition(Predicate<T> predicate, String conditionName) Creates an instance of aResourceConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionNamerecord component.static <T extends io.fabric8.kubernetes.api.model.HasMetadata>
ResourceCondition<T>deletion()Creates a ResourceCondition representing deletion of a resource.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepredicaterecord component.static <T extends io.fabric8.kubernetes.api.model.HasMetadata>
ResourceCondition<T>readiness(ResourceType<T> type) Creates a ResourceCondition representing readiness of a resource of the given type.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResourceCondition
Creates an instance of aResourceConditionrecord class.- Parameters:
predicate- the value for thepredicaterecord componentconditionName- the value for theconditionNamerecord component
-
-
Method Details
-
readiness
public static <T extends io.fabric8.kubernetes.api.model.HasMetadata> ResourceCondition<T> readiness(ResourceType<T> type) Creates a ResourceCondition representing readiness of a resource of the given type.- Type Parameters:
T- Type of Kubernetes resource.- Parameters:
type- The resource type.- Returns:
- The ResourceCondition representing readiness.
-
deletion
public static <T extends io.fabric8.kubernetes.api.model.HasMetadata> ResourceCondition<T> deletion()Creates a ResourceCondition representing deletion of a resource.- Type Parameters:
T- Type of Kubernetes resource.- Returns:
- The ResourceCondition representing deletion.
-
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). -
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
conditionName
Returns the value of theconditionNamerecord component.- Returns:
- the value of the
conditionNamerecord component
-