Class/Object

org.scalafmt.internal

Split

Related Docs: object Split | package internal

Permalink

case class Split(modification: Modification, cost: Int, ignoreIf: Boolean = false, indents: Vector[Indent[Length]] = Vector.empty[Indent[Length]], policy: Policy = NoPolicy, 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?

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, 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?

    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. def andThenPolicy(newPolicy: Policy): Split

    Permalink
  6. final def asInstanceOf[T0]: T0

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

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

    Permalink

    How good is this output? Lower is better.

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

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

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

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

    Permalink
  13. val indentation: String

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

    Permalink

    Does this add indentation?

  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. def length: Int

    Permalink
  17. implicit val line: Line

    Permalink

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

  18. val modification: Modification

    Permalink

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  22. def onlyIf(flag: Boolean): Split

    Permalink
  23. val optimalAt: Option[OptimalToken]

    Permalink
  24. def orElsePolicy(newPolicy: Policy): Split

    Permalink
  25. val policy: Policy

    Permalink

    How does this split affect other later splits?

  26. def sameSplit(other: Split): Boolean

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

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

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

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

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

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

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

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

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

    Permalink
  36. def withPolicy(newPolicy: Option[Policy]): Split

    Permalink
  37. 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