All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tethys.readers.FieldName.scala Maven / Gradle / Ivy

The newest version!
package tethys.readers

final case class FieldName(value: () => String) {
  self =>

  def appendFieldName(s: String): FieldName = FieldName(() => s"${value()}.$s")

  def appendArrayIndex(i: Int): FieldName = FieldName(() => s"${value()}[$i]")
}
object FieldName {
  def apply(): FieldName = new FieldName(() => "[ROOT]")

  def apply(value: String): FieldName = new FieldName(() => value)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy