Class

com.github.andyglow.tree

Truncated

Related Doc: package tree

Permalink

class Truncated extends Iterator[String]

Wraps an input iterator of Strings, and produces the same Strings but truncated once the wrapped-at-width text reaches beyond a certain height

Linear Supertypes
Iterator[String], TraversableOnce[String], GenTraversableOnce[String], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Truncated
  2. Iterator
  3. TraversableOnce
  4. GenTraversableOnce
  5. AnyRef
  6. Any
Implicitly
  1. by MonadOps
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  6. by alternateImplicit
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Truncated(chunks0: Iterator[String], width: Int, height: Int, truncationMarker: String = "...")

    Permalink

Type Members

  1. class GroupedIterator[B >: A] extends AbstractIterator[Seq[B]] with Iterator[Seq[B]]

    Permalink
    Definition Classes
    Iterator

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to any2stringadd[Truncated] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ++[B >: String](that: ⇒ GenTraversableOnce[B]): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  5. def ->[B](y: B): (Truncated, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to ArrowAssoc[Truncated] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. def /:[B](z: B)(op: (B, String) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  7. def :\[B](z: B)(op: (String, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  8. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def addString(b: StringBuilder): StringBuilder

    Permalink
    Definition Classes
    TraversableOnce
  10. def addString(b: StringBuilder, sep: String): StringBuilder

    Permalink
    Definition Classes
    TraversableOnce
  11. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Permalink
    Definition Classes
    TraversableOnce
  12. def aggregate[B](z: ⇒ B)(seqop: (B, String) ⇒ B, combop: (B, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def buffered: BufferedIterator[String]

    Permalink
    Definition Classes
    Iterator
  15. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @throws( ... )
  16. def collect[B](pf: PartialFunction[String, B]): Iterator[B]

    Permalink
    Definition Classes
    Iterator
    Annotations
    @migration
    Migration

    (Changed in version 2.8.0) collect has changed. The previous behavior can be reproduced with toSeq.

  17. def collectFirst[B](pf: PartialFunction[String, B]): Option[B]

    Permalink
    Definition Classes
    TraversableOnce
  18. def completedLineCount: Int

    Permalink
  19. def contains(elem: Any): Boolean

    Permalink
    Definition Classes
    Iterator
  20. def copyToArray[B >: String](xs: Array[B], start: Int, len: Int): Unit

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  21. def copyToArray[B >: String](xs: Array[B]): Unit

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  22. def copyToArray[B >: String](xs: Array[B], start: Int): Unit

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  23. def copyToBuffer[B >: String](dest: Buffer[B]): Unit

    Permalink
    Definition Classes
    TraversableOnce
  24. def corresponds[B](that: GenTraversableOnce[B])(p: (String, B) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    Iterator
  25. def count(p: (String) ⇒ Boolean): Int

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  26. def drop(n: Int): Iterator[String]

    Permalink
    Definition Classes
    Iterator
  27. def dropWhile(p: (String) ⇒ Boolean): Iterator[String]

    Permalink
    Definition Classes
    Iterator
  28. def duplicate: (Iterator[String], Iterator[String])

    Permalink
    Definition Classes
    Iterator
  29. def ensuring(cond: (Truncated) ⇒ Boolean, msg: ⇒ Any): Truncated

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to Ensuring[Truncated] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  30. def ensuring(cond: (Truncated) ⇒ Boolean): Truncated

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to Ensuring[Truncated] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  31. def ensuring(cond: Boolean, msg: ⇒ Any): Truncated

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to Ensuring[Truncated] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  32. def ensuring(cond: Boolean): Truncated

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to Ensuring[Truncated] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  33. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  35. def exists(p: (String) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  36. def filter(p: (String) ⇒ Boolean): Iterator[String]

    Permalink
    Definition Classes
    Iterator
  37. def filterNot(p: (String) ⇒ Boolean): Iterator[String]

    Permalink
    Definition Classes
    Iterator
  38. def find(p: (String) ⇒ Boolean): Option[String]

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  39. def flatMap[B](f: (String) ⇒ GenTraversableOnce[B]): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  40. def fold[A1 >: String](z: A1)(op: (A1, A1) ⇒ A1): A1

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  41. def foldLeft[B](z: B)(op: (B, String) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  42. def foldRight[B](z: B)(op: (String, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  43. def forall(p: (String) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  44. def foreach[U](f: (String) ⇒ U): Unit

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  45. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to StringFormat[Truncated] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  46. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate()
  47. def grouped[B >: String](size: Int): GroupedIterator[B]

    Permalink
    Definition Classes
    Iterator
  48. def hasDefiniteSize: Boolean

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  49. def hasNext: Boolean

    Permalink
    Definition Classes
    Truncated → Iterator
  50. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate()
  51. def indexOf[B >: String](elem: B): Int

    Permalink
    Definition Classes
    Iterator
  52. def indexWhere(p: (String) ⇒ Boolean): Int

    Permalink
    Definition Classes
    Iterator
  53. def isEmpty: Boolean

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  54. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  55. def isTraversableAgain: Boolean

    Permalink
    Definition Classes
    Iterator → GenTraversableOnce
  56. def isTruncated: Boolean

    Permalink
  57. def lastLineLength: Int

    Permalink
  58. def length: Int

    Permalink
    Definition Classes
    Iterator
  59. val lineLengths: Buffer[Int]

    Permalink
  60. def map[B](f: (String) ⇒ B): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  61. def max[B >: String](implicit cmp: Ordering[B]): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  62. def maxBy[B](f: (String) ⇒ B)(implicit cmp: Ordering[B]): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  63. def min[B >: String](implicit cmp: Ordering[B]): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  64. def minBy[B](f: (String) ⇒ B)(implicit cmp: Ordering[B]): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  65. def mkString: String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  66. def mkString(sep: String): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  67. def mkString(start: String, sep: String, end: String): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  68. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  69. def next(): String

    Permalink

    Truncated streams the chunks one by one until it reaches the height limit; then, it buffers up to one entire row worth of chunks to check whether it overshoots.

    Truncated streams the chunks one by one until it reaches the height limit; then, it buffers up to one entire row worth of chunks to check whether it overshoots. If it overshoots, it discards the chunks and prints "..." instead. If not, the buffered chunks get printed all at once.

    Definition Classes
    Truncated → Iterator
  70. def nonEmpty: Boolean

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  71. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate()
  72. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate()
  73. def padTo[A1 >: String](len: Int, elem: A1): Iterator[A1]

    Permalink
    Definition Classes
    Iterator
  74. def partition(p: (String) ⇒ Boolean): (Iterator[String], Iterator[String])

    Permalink
    Definition Classes
    Iterator
  75. def patch[B >: String](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  76. def product[B >: String](implicit num: Numeric[B]): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  77. def reduce[A1 >: String](op: (A1, A1) ⇒ A1): A1

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  78. def reduceLeft[B >: String](op: (B, String) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce
  79. def reduceLeftOption[B >: String](op: (B, String) ⇒ B): Option[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  80. def reduceOption[A1 >: String](op: (A1, A1) ⇒ A1): Option[A1]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  81. def reduceRight[B >: String](op: (String, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  82. def reduceRightOption[B >: String](op: (String, B) ⇒ B): Option[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  83. def reversed: List[String]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  84. def sameElements(that: Iterator[_]): Boolean

    Permalink
    Definition Classes
    Iterator
  85. def scanLeft[B](z: B)(op: (B, String) ⇒ B): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  86. def scanRight[B](z: B)(op: (String, B) ⇒ B): Iterator[B]

    Permalink
    Definition Classes
    Iterator
  87. def seq: Iterator[String]

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  88. def size: Int

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  89. def slice(from: Int, until: Int): Iterator[String]

    Permalink
    Definition Classes
    Iterator
  90. def sliding[B >: String](size: Int, step: Int): GroupedIterator[B]

    Permalink
    Definition Classes
    Iterator
  91. def span(p: (String) ⇒ Boolean): (Iterator[String], Iterator[String])

    Permalink
    Definition Classes
    Iterator
  92. def sum[B >: String](implicit num: Numeric[B]): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  93. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  94. def take(n: Int): Iterator[String]

    Permalink
    Definition Classes
    Iterator
  95. def takeWhile(p: (String) ⇒ Boolean): Iterator[String]

    Permalink
    Definition Classes
    Iterator
  96. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, String, Col[String]]): Col[String]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  97. def toArray[B >: String](implicit arg0: ClassTag[B]): Array[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  98. def toBuffer[B >: String]: Buffer[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  99. def toIndexedSeq: IndexedSeq[String]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  100. def toIterable: Iterable[String]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  101. def toIterator: Iterator[String]

    Permalink
    Definition Classes
    Iterator → GenTraversableOnce
  102. def toList: List[String]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  103. def toMap[T, U](implicit ev: <:<[String, (T, U)]): Map[T, U]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  104. def toResult: Result

    Permalink
  105. def toSeq: Seq[String]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  106. def toSet[B >: String]: Set[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  107. def toStream: Stream[String]

    Permalink
    Definition Classes
    Iterator → GenTraversableOnce
  108. def toString(): String

    Permalink
    Definition Classes
    Iterator → AnyRef → Any
  109. def toTraversable: Traversable[String]

    Permalink
    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  110. def toVector: Vector[String]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  111. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  113. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  114. def withFilter(p: (String) ⇒ Boolean): Iterator[String]

    Permalink
    Definition Classes
    Iterator
  115. def zip[B](that: Iterator[B]): Iterator[(String, B)]

    Permalink
    Definition Classes
    Iterator
  116. def zipAll[B, A1 >: String, B1 >: B](that: Iterator[B], thisElem: A1, thatElem: B1): Iterator[(A1, B1)]

    Permalink
    Definition Classes
    Iterator
  117. def zipWithIndex: Iterator[(String, Int)]

    Permalink
    Definition Classes
    Iterator
  118. def [B](y: B): (Truncated, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to ArrowAssoc[Truncated] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def filter(p: (String) ⇒ Boolean): TraversableOnce[String]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to MonadOps[String] performed by method MonadOps in scala.collection.TraversableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (truncated: MonadOps[String]).filter(p)
    Definition Classes
    MonadOps
  2. def flatMap[B](f: (String) ⇒ GenTraversableOnce[B]): TraversableOnce[B]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to MonadOps[String] performed by method MonadOps in scala.collection.TraversableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (truncated: MonadOps[String]).flatMap(f)
    Definition Classes
    MonadOps
  3. def map[B](f: (String) ⇒ B): TraversableOnce[B]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to MonadOps[String] performed by method MonadOps in scala.collection.TraversableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (truncated: MonadOps[String]).map(f)
    Definition Classes
    MonadOps
  4. def withFilter(p: (String) ⇒ Boolean): Iterator[String]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Truncated to MonadOps[String] performed by method MonadOps in scala.collection.TraversableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (truncated: MonadOps[String]).withFilter(p)
    Definition Classes
    MonadOps

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Iterator[String]

Inherited from TraversableOnce[String]

Inherited from GenTraversableOnce[String]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion MonadOps from Truncated to MonadOps[String]

Inherited by implicit conversion any2stringadd from Truncated to any2stringadd[Truncated]

Inherited by implicit conversion StringFormat from Truncated to StringFormat[Truncated]

Inherited by implicit conversion Ensuring from Truncated to Ensuring[Truncated]

Inherited by implicit conversion ArrowAssoc from Truncated to ArrowAssoc[Truncated]

Inherited by implicit conversion alternateImplicit from Truncated to ForceImplicitAmbiguity

Ungrouped