Record Class RecordSection<T>
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.record.RecordSection<T>
- Type Parameters:
T- the content type- Record Components:
status- whether the section was producedreason- why it was skipped or failed;nullwhen includedcontent- the section's content;nullunless included
public record RecordSection<T>(RecordSection.Status status, String reason, T content)
extends Record
One section of a
DesignDecisionRecord: its content, or why there is none.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhether a section was produced. -
Constructor Summary
ConstructorsConstructorDescriptionRecordSection(RecordSection.Status status, String reason, T content) Requires content exactly when included, and a reason otherwise. -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.static <T> RecordSection<T> final inthashCode()Returns a hash code value for this object.static <T> RecordSection<T> included(T content) booleanreason()Returns the value of thereasonrecord component.static <T> RecordSection<T> status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecordSection
Requires content exactly when included, and a reason otherwise.
-
-
Method Details
-
included
- Type Parameters:
T- its type- Parameters:
content- the content- Returns:
- an included section
-
skipped
- Type Parameters:
T- the content type- Parameters:
reason- why the section has no content- Returns:
- a skipped section
-
failed
- Type Parameters:
T- the content type- Parameters:
reason- what failed- Returns:
- a failed section
-
isIncluded
public boolean isIncluded()- Returns:
truewhen the section has content
-
toString
-
hashCode
-
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). -
status
-
reason
-
content
-