Record Class WPRendered
java.lang.Object
java.lang.Record
net.ygbstudio.powerwp4j.models.entities.WPRendered
- Record Components:
rendered- the rendered HTML contentprotectedContent- whether the content is protected (optional)
public record WPRendered(@NotNull String rendered, @Nullable Boolean protectedContent)
extends Record
A record representing a rendered WordPress field (e.g. title, content, excerpt).
-
Constructor Summary
ConstructorsConstructorDescriptionWPRendered(@NotNull String rendered, @Nullable Boolean protectedContent) Creates an instance of aWPRenderedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable BooleanReturns the value of theprotectedContentrecord component.@NotNull Stringrendered()Returns the value of therenderedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WPRendered
Creates an instance of aWPRenderedrecord class.- Parameters:
rendered- the value for therenderedrecord componentprotectedContent- the value for theprotectedContentrecord component
-
-
Method Details
-
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). -
rendered
Returns the value of therenderedrecord component.- Returns:
- the value of the
renderedrecord component
-
protectedContent
Returns the value of theprotectedContentrecord component.- Returns:
- the value of the
protectedContentrecord component
-