com.gu.json

Cursor

case class Cursor[J](focus: J, path: Path[J])(implicit J: JsonLike[J]) extends Product with Serializable

Represents a position within a JSON structure, comprising a value under the cursor (the focus) and a context.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Cursor
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Cursor(focus: J, path: Path[J])(implicit J: JsonLike[J])

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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def deleteGoRight: Option[Cursor[J]]

    Delete the array element at the focus, and move to the next element on the right

  7. def deleteGoUp: Option[Cursor[J]]

    Delete the value at the focus, and move up one level

  8. def elem(index: Int): Option[Cursor[J]]

    Move the focus down to the array element at the specified index

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

    Definition Classes
    AnyRef
  10. def field(name: String): Option[Cursor[J]]

    Move the focus to the named field in an object

  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def findLeft(pfn: PartialFunction[J, Boolean]): Option[Cursor[J]]

    Find an array element to the left of the focus matching a predicate

  13. def findRight(pfn: PartialFunction[J, Boolean]): Option[Cursor[J]]

    Find an array element to the right of the focus matching a predicate

  14. def firstElem: Option[Cursor[J]]

    Move the focus down to the first element of an array

  15. val focus: J

  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def insertField(name: String, value: J): Option[Cursor[J]]

    Prepend a field to the object in the focus, and move the focus to the value of the new field

  18. def insertFieldLeft(name: String, value: J): Option[Cursor[J]]

    Insert a new field at the left of the focus, and move focus to the new field value

  19. def insertFieldRight(name: String, value: J): Option[Cursor[J]]

    Insert a new field at the right of the focus, and move focus to the new field value

  20. def insertLeft(newElem: J): Option[Cursor[J]]

    Insert a new array element at the left of the focus, and move focus to the new element

  21. def insertOrReplaceField(name: String, value: J): Option[Cursor[J]]

  22. def insertRight(newElem: J): Option[Cursor[J]]

    Insert a new array element at the right of the focus, and move focus to the new element

  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. def keySet: Option[Set[String]]

  25. def left: Option[Cursor[J]]

    Move the focus left by one array element

  26. def leftN(n: Int): Option[Cursor[J]]

    Move the focus left n times in an array

  27. final def lefts: Stream[Cursor[J]]

    Stream of cursors resulting from moving left in an array

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

    Definition Classes
    AnyRef
  29. final def notify(): Unit

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

    Definition Classes
    AnyRef
  31. val path: Path[J]

  32. def prepend(elem: J): Option[Cursor[J]]

    Prepend an element to the array at the focus of the cursor

  33. def rename(name: String): Option[Cursor[J]]

    Rename the field at the focus

  34. def replace(newFocus: J): Cursor[J]

    Replace the value at the focus

  35. def right: Option[Cursor[J]]

    Move the focus right by one array element

  36. def rightN(n: Int): Option[Cursor[J]]

    Move the focus right n times in an array

  37. final def rights: Stream[Cursor[J]]

    Stream of cursors resulting from moving right in an array

  38. final def root: Cursor[J]

    Go back to the root of the tree

    Go back to the root of the tree

    Annotations
    @tailrec()
  39. def sibling(name: String): Option[Cursor[J]]

    Move the focus to the named field, at the same level as the current focus in an object

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

    Definition Classes
    AnyRef
  41. def toJson: J

    Retrieve the value at the root

  42. def transform(f: PartialFunction[J, J]): Cursor[J]

    Transform the value at the focus

  43. def up: Option[Cursor[J]]

    Move the focus up one level

  44. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. def withFocus(f: (J) ⇒ J): Cursor[J]

    Transform the value at the focus

  48. def withFocusF[F[_]](f: (J) ⇒ F[J])(implicit arg0: Functor[F]): F[Cursor[J]]

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped