Top Description Inners
org.jabref.htmltonode.model

public sealed Interface Inline

permits TextRun, LineBreak, Image
Known Direct Implementers
org.jabref.htmltonode.model.Inline.TextRun, org.jabref.htmltonode.model.Inline.LineBreak, org.jabref.htmltonode.model.Inline.Image
Imports
org.jspecify.annotations.Nullable

Inline-level content of a paragraph-like block.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static record
Inline.Image

An <img>.

public static record
Inline.LineBreak

An explicit <br> line break.

public static record
Inline.TextRun

A run of text with a single resolved style.

org.jabref.htmltonode.model back to summary

public final Record Inline.Image

extends Record
implements Inline
Class Inheritance
All Implemented Interfaces
org.jabref.htmltonode.model.Inline
Record Components
source:String
resolved (absolute if a base URI was known) image URL
width:@Nullable CssLength
requested width, or null if unset
height:@Nullable CssLength
requested height, or null if unset
blockImage:boolean
display: block — rendered on a line of its own
alt:@Nullable String
alternative text, or null

An <img>.

Field Summary

Modifier and TypeField and Description
private final @Nullable String
alt

Record Component accessed by alt().

alternative text, or null
private final boolean
blockImage

Record Component accessed by blockImage().

display: block — rendered on a line of its own
private final @Nullable CssLength
height

Record Component accessed by height().

requested height, or null if unset
private final String
source

Record Component accessed by source().

resolved (absolute if a base URI was known) image URL
private final @Nullable CssLength
width

Record Component accessed by width().

requested width, or null if unset

Constructor Summary

AccessConstructor and Description
public
Image(String source, @Nullable CssLength width, @Nullable CssLength height, boolean blockImage, @Nullable String alt)

Method Summary

Modifier and TypeMethod and Description
public @Nullable String
alt()

Record Component getter of alt.

Record Component alternative text, or null

public boolean
blockImage()

Record Component getter of blockImage.

Record Component display: block — rendered on a line of its own

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public @Nullable CssLength
height()

Record Component getter of height.

Record Component requested height, or null if unset

public String
source()

Record Component getter of source.

Record Component resolved (absolute if a base URI was known) image URL

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

public @Nullable CssLength
width()

Record Component getter of width.

Record Component requested width, or null if unset

Field Detail

altback to summary
private final @Nullable String alt

Record Component accessed by alt().

alternative text, or null

blockImageback to summary
private final boolean blockImage

Record Component accessed by blockImage().

display: block — rendered on a line of its own

heightback to summary
private final @Nullable CssLength height

Record Component accessed by height().

requested height, or null if unset

sourceback to summary
private final String source

Record Component accessed by source().

resolved (absolute if a base URI was known) image URL

widthback to summary
private final @Nullable CssLength width

Record Component accessed by width().

requested width, or null if unset

Constructor Detail

Imageback to summary
public Image(String source, @Nullable CssLength width, @Nullable CssLength height, boolean blockImage, @Nullable String alt)

Method Detail

altback to summary
public @Nullable String alt()

Record Component getter of alt.

Record Component
alternative text, or null
blockImageback to summary
public boolean blockImage()

Record Component getter of blockImage.

Record Component
display: block — rendered on a line of its own
equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

heightback to summary
public @Nullable CssLength height()

Record Component getter of height.

Record Component
requested height, or null if unset
sourceback to summary
public String source()

Record Component getter of source.

Record Component
resolved (absolute if a base URI was known) image URL
toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

widthback to summary
public @Nullable CssLength width()

Record Component getter of width.

Record Component
requested width, or null if unset
org.jabref.htmltonode.model back to summary

public final Record Inline.LineBreak

extends Record
implements Inline
Class Inheritance
All Implemented Interfaces
org.jabref.htmltonode.model.Inline
Record Components
no record components

An explicit <br> line break.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Constructor Detail

LineBreakback to summary
public LineBreak()

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

org.jabref.htmltonode.model back to summary

public final Record Inline.TextRun

extends Record
implements Inline
Class Inheritance
All Implemented Interfaces
org.jabref.htmltonode.model.Inline
Record Components
text:String 
style:InlineStyle 

A run of text with a single resolved style. Whitespace is already collapsed (except for runs originating in pre/white-space: pre-wrap contexts).

Field Summary

Modifier and TypeField and Description
private final InlineStyle
style

Record Component accessed by style().

private final String
text

Record Component accessed by text().

Constructor Summary

AccessConstructor and Description
public
TextRun(String text, InlineStyle style)

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public InlineStyle
style()

Record Component getter of style.

public String
text()

Record Component getter of text.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

styleback to summary
private final InlineStyle style

Record Component accessed by style().

textback to summary
private final String text

Record Component accessed by text().

Constructor Detail

TextRunback to summary
public TextRun(String text, InlineStyle style)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

styleback to summary
public InlineStyle style()

Record Component getter of style.

textback to summary
public String text()

Record Component getter of text.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.