Class

org.scalafmt.internal

Split

Related Doc: package internal

Permalink

case class Split(modification: Modification, cost: Int, ignoreIf: Boolean = false, indents: Vector[Indent[Length]] = Vector.empty[Indent[Length]], policy: Policy = NoPolicy, penalty: Boolean = false, optimalAt: Option[OptimalToken] = None)(implicit line: Line) extends Product with Serializable

A Split is the whitespace between two non-whitespace tokens.

Consider a split to be an edge in a search graph and FormatToken are the nodes.

modification

Is this a space, no space, newline or 2 newlines?

cost

How good is this output? Lower is better.

indents

Does this add indentation?

policy

How does this split affect other later splits?

penalty

Does this split overflow the column limit?

line

For debugging, to retrace from which case in Router this split originates.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Split
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Split(modification: Modification, cost: Int, ignoreIf: Boolean = false, indents: Vector[Indent[Length]] = Vector.empty[Indent[Length]], policy: Policy = NoPolicy, penalty: Boolean = false, optimalAt: Option[OptimalToken] = None)(implicit line: Line)

    Permalink

    modification

    Is this a space, no space, newline or 2 newlines?

    cost

    How good is this output? Lower is better.

    indents

    Does this add indentation?

    policy

    How does this split affect other later splits?

    penalty

    Does this split overflow the column limit?

    line

    For debugging, to retrace from which case in Router this split originates.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def adapt(formatToken: FormatToken): Split

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val cost: Int

    Permalink

    How good is this output? Lower is better.

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. val ignoreIf: Boolean

    Permalink
  12. val indentation: String

    Permalink
  13. val indents: Vector[Indent[Length]]

    Permalink

    Does this add indentation?

  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def length: Int

    Permalink
  16. implicit val line: Line

    Permalink

    For debugging, to retrace from which case in Router this split originates.

  17. val modification: Modification

    Permalink

    Is this a space, no space, newline or 2 newlines?

  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. val optimalAt: Option[OptimalToken]

    Permalink
  22. val penalty: Boolean

    Permalink

    Does this split overflow the column limit?

  23. val policy: Policy

    Permalink

    How does this split affect other later splits?

  24. def sameSplit(other: Split): Boolean

    Permalink
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    Split → AnyRef → Any
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def withIndent(length: Length, expire: Token, expiresOn: ExpiresOn): Split

    Permalink
  31. def withOptimalToken(token: Token, killOnFail: Boolean = false): Split

    Permalink
  32. def withOptimalToken(token: Option[Token]): Split

    Permalink
  33. def withPenalty(penalty: Int): Split

    Permalink
  34. def withPolicy(newPolicy: Policy): Split

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped