com.opendatagroup.hadrian.data

PFAArray

class PFAArray[X] extends List[X]

Represents all arrays in PFA (generic or specific).

Data are stored in an immutable Scala Vector, which is either created directly by the PFAArray.fromVector companion object method or filled by Avro (see below).

Primitives should be typed in Scala as raw primitives (e.g. PFAArray[Int], not PFAArray[java.lang.Integer]).

To interact with the Avro library, a PFAArray satisfies the java.util.List contract, but only minimally (most methods throw NotImplementedException).

It has two stages:

The toVector method should be considered lightweight (the backing Vector is only created once).

PFAArrays can also have metadata to optimize some library functions (e.g. nearest neighbor benefits from having data arranged in a kd-tree, rather than just a flat list). Library functions use this at will.

Linear Supertypes
List[X], Collection[X], Iterable[X], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PFAArray
  2. List
  3. Collection
  4. Iterable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PFAArray(builder: Builder[X, Vector[X]], vector: Vector[X])

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. def add(index: Int, obj: X): Unit

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  7. def add(obj: X): Boolean

    The only java.util.List method that has been implemented (needed for filling in the Avro library).

    The only java.util.List method that has been implemented (needed for filling in the Avro library).

    Definition Classes
    PFAArray → List → Collection
  8. def addAll(index: Int, that: Collection[_ <: X]): Boolean

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  9. def addAll(that: Collection[_ <: X]): Boolean

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  10. def apply(i: Int): X

    Calls toVector.apply(i).

  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. def clear(): Unit

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def contains(obj: AnyRef): Boolean

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  15. def containsAll(that: Collection[_]): Boolean

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  16. def converted[X](elem: X, schema: Schema): X

    Helper function to ensure that numerical types are exactly right (int for int, long for long, etc.

    Helper function to ensure that numerical types are exactly right (int for int, long for long, etc.).

    elem

    datum to convert

    schema

    schema to convert it to

    returns

    converted datum (unboxed primitives)

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

    Definition Classes
    AnyRef
  18. def equals(that: Any): Boolean

    Definition Classes
    PFAArray → List → Collection → AnyRef → Any
  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def forEach(arg0: Consumer[_ >: X]): Unit

    Definition Classes
    Iterable
  21. def get(index: Int): X

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  22. final def getClass(): Class[_]

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

    Definition Classes
    PFAArray → List → Collection → AnyRef → Any
  24. def indexOf(obj: AnyRef): Int

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  25. def isEmpty(): Boolean

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. def iterator(): Iterator[X]

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection → Iterable
  28. def lastIndexOf(obj: AnyRef): Int

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  29. def listIterator(index: Int): ListIterator[X]

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  30. def listIterator(): ListIterator[X]

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  31. def metadata: Map[String, Any]

    Access to optional metadata, which is created on first access.

  32. def metadata_=(x: Map[String, Any]): Unit

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

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

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

    Definition Classes
    AnyRef
  36. def parallelStream(): Stream[X]

    Definition Classes
    Collection
  37. def remove(obj: AnyRef): Boolean

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  38. def remove(index: Int): X

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  39. def removeAll(that: Collection[_]): Boolean

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  40. def removeIf(arg0: Predicate[_ >: X]): Boolean

    Definition Classes
    Collection
  41. def replaceAll(arg0: UnaryOperator[X]): Unit

    Definition Classes
    List
  42. def retainAll(that: Collection[_]): Boolean

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  43. def set(index: Int, element: X): X

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  44. def size(): Int

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  45. def sort(arg0: Comparator[_ >: X]): Unit

    Definition Classes
    List
  46. def spliterator(): Spliterator[X]

    Definition Classes
    List → Collection → Iterable
  47. def stream(): Stream[X]

    Definition Classes
    Collection
  48. def subList(fromIndex: Int, toIndex: Int): List[X]

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List
  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  50. def toArray[Y](y: Array[Y]): Array[Y]

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  51. def toArray(): Array[AnyRef]

    Raises NotImplementedError.

    Raises NotImplementedError.

    Definition Classes
    PFAArray → List → Collection
  52. def toString(): String

    Definition Classes
    PFAArray → AnyRef → Any
  53. def toVector: Vector[X]

    Access the Scala Vector behind this PFAArray.

    Access the Scala Vector behind this PFAArray.

    After the first call to this function, it references a cached Vector.

  54. def updated[Y](path: List[PathIndex], updator: (Y) ⇒ Y, schema: Schema): PFAArray[X]

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    path

    coordinates of the deep element to have replaced

    updator

    function that replaces the old value with a new one

    schema

    schema of the subelement

    returns

    new PFAArray, leaving the old one untouched

  55. def updated[Y](path: Array[PathIndex], updator: (Y) ⇒ Y, schema: Schema, arrayErrStr: String, arrayErrCode: Int, mapErrStr: String, mapErrCode: Int, fcnName: String, pos: Option[String]): PFAArray[X]

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    path

    coordinates of the deep element to have replaced

    updator

    function that replaces the old value with a new one

    schema

    schema of the subelement

    arrayErrStr

    error message if an array path index is wrong

    arrayErrCode

    error code if an array path index is wrong

    mapErrStr

    error message if a map path index is wrong

    mapErrCode

    error code if a map path index is wrong

    fcnName

    name of the calling PFA function

    pos

    locator mark for the calling PFA function

    returns

    new PFAArray, leaving the old one untouched

  56. def updated[Y](path: Array[PathIndex], updator: (Y) ⇒ Y, schema: Schema): PFAArray[X]

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    path

    coordinates of the deep element to have replaced

    updator

    function that replaces the old value with a new one

    schema

    schema of the subelement

    returns

    new PFAArray, leaving the old one untouched

  57. def updated(path: Array[PathIndex], elem: X, schema: Schema, arrayErrStr: String, arrayErrCode: Int, mapErrStr: String, mapErrCode: Int, fcnName: String, pos: Option[String]): PFAArray[X]

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    path

    coordinates of the deep element to have replaced

    elem

    new value for the subelement

    schema

    schema of the subelement

    arrayErrStr

    error message if an array path index is wrong

    arrayErrCode

    error code if an array path index is wrong

    mapErrStr

    error message if a map path index is wrong

    mapErrCode

    error code if a map path index is wrong

    fcnName

    name of the calling PFA function

    pos

    locator mark for the calling PFA function

    returns

    new PFAArray, leaving the old one untouched

  58. def updated(path: Array[PathIndex], elem: X, schema: Schema): PFAArray[X]

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    path

    coordinates of the deep element to have replaced

    elem

    new value for the subelement

    schema

    schema of the subelement

    returns

    new PFAArray, leaving the old one untouched

  59. def updated(path: List[PathIndex], elem: X, schema: Schema): PFAArray[X]

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    Returns an updated copy of this PFAArray (and its substructures) with a deep element replaced.

    path

    coordinates of the deep element to have replaced

    elem

    new value for the subelement

    schema

    schema of the subelement

    returns

    new PFAArray, leaving the old one untouched

  60. def updated(i: Int, elem: X, schema: Schema): PFAArray[X]

    Returns an updated copy of this PFAArray with one element replaced.

    Returns an updated copy of this PFAArray with one element replaced.

    i

    numerical index of element to have replaced

    elem

    new value for element

    schema

    schema of element

    returns

    new PFAArray, leaving the old one untouched

  61. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from List[X]

Inherited from Collection[X]

Inherited from Iterable[X]

Inherited from AnyRef

Inherited from Any

Ungrouped