java.lang.Object
java.lang.Record
org.aya.pretty.doc.Doc.FlatAlt
- 封闭接口:
- Doc
public static record Doc.FlatAlt(@NotNull Doc defaultDoc, @NotNull Doc preferWhenFlatten)
extends Record
implements Doc
Lay out the defaultDoc 'Doc', but when flattened (via 'group'), prefer
the preferWhenFlatten.
The layout algorithms work under the assumption that the defaultDoc
alternative is less wide than the flattened preferWhenFlatten alternative.
-
嵌套类概要
从接口继承的嵌套类/接口 org.aya.pretty.doc.Doc
Doc.Cat, Doc.Column, Doc.Empty, Doc.FlatAlt, Doc.HyperLinked, Doc.Line, Doc.Nest, Doc.Nesting, Doc.PageWidth, Doc.PlainText, Doc.SpecialSymbol, Doc.Styled, Doc.Union -
字段概要
-
构造器概要
构造器 -
方法概要
从接口继承的方法 org.aya.pretty.doc.Doc
asSeq, commonRender, debugRender, render, renderToHtml, renderToHtml, renderToString, renderToTeX, renderWithPageWidth, toDoc
-
构造器详细资料
-
FlatAlt
创建FlatAlt记录的实例。- 参数:
defaultDoc-defaultDoc记录组件的值preferWhenFlatten-preferWhenFlatten记录组件的值
-
-
方法详细资料
-
toString
返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录中的所有组件都使用Objects::equals(Object,Object)进行比较。 -
defaultDoc
返回defaultDoc记录组件的值。- 返回:
defaultDoc记录组件的值
-
preferWhenFlatten
返回preferWhenFlatten记录组件的值。- 返回:
preferWhenFlatten记录组件的值
-