com.twitter.bijection

StringJoinBijection

Related Doc: package bijection

object StringJoinBijection

Bijection for joining together iterables of strings into a single string and splitting them back out. Useful for storing sequences of strings in Config maps.

Source
StringBijections.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. StringJoinBijection
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. val DEFAULT_SEP: String

  5. def apply(separator: String = DEFAULT_SEP): Bijection[Iterable[String], Option[String]]

  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def nonEmptyValues[N, B <: TraversableOnce[N]](separator: String = DEFAULT_SEP)(implicit bij: ImplicitBijection[N, String], ab: CanBuildFrom[Nothing, N, B]): Bijection[B, String]

    Convert a collection of numbers to and from a string It's common to have types which we know have at least 1 character in their string representation.

    Convert a collection of numbers to and from a string It's common to have types which we know have at least 1 character in their string representation. Knowing that the empty string is not allowed we can map that to the empty collection: TODO add a Tag appoach to Say that N has no zero-length representations

  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  19. def toString(): String

    Definition Classes
    AnyRef → Any
  20. def viaContainer[A, B <: TraversableOnce[A]](separator: String = DEFAULT_SEP)(implicit bij: Bijection[A, String], ab: CanBuildFrom[Nothing, A, B]): Bijection[B, Option[String]]

    Converts between any collection of A and and Option[String], given an implicit Bijection[A,String].

    Converts between any collection of A and and Option[String], given an implicit Bijection[A,String]. To get the final string out, compose with the getOrElse bijection if there is no zero length valid A

    viaContainer[Int,Set[Int]] andThen Bijection.getOrElse(""): Bijection[Set[Int],String]

    Note that this can be dangerous with empty collections, as Bijection will try to convert "" -> Int. It's safer to use an instance of type A with the "as" notation for a default item in the collection:

    viaContainer[Int,Set[Int]] andThen Bijection.getOrElse(0.as[String]): Bijection[Set[Int],String]

  21. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped