c

shapeless.syntax

RecordOps

final class RecordOps[L <: HList] extends AnyVal with Serializable

Record operations on HList's with field-like elements.

Linear Supertypes
Serializable, Serializable, AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RecordOps
  2. Serializable
  3. Serializable
  4. AnyVal
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RecordOps(l: L)

Type Members

  1. type FSL[K] = Selector[L, K]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def +[F](f: F)(implicit updater: Updater[L, F]): Out

    Updates or adds to this record a field of type F.

  4. def -[V, Out <: HList](k: Witness)(implicit remover: ops.record.Remover.Aux[L, T, (V, Out)]): Out

    Remove the field associated with the singleton typed key k, returning the updated record.

    Remove the field associated with the singleton typed key k, returning the updated record. Only available if this record has a field with keyType equal to the singleton type k.T.

  5. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  6. def alignByKeys[K <: HList](implicit alignByKeys: AlignByKeys[L, K]): Out

    Align the keys on the order of HList of keys K

  7. def apply(k: Witness)(implicit selector: Selector[L, T]): Out

    Returns the value associated with the singleton typed key k.

    Returns the value associated with the singleton typed key k. Only available if this record has a field with with keyType equal to the singleton type k.T.

    Note that this can creates a bogus ambiguity with HListOps#apply as described in https://issues.scala-lang.org/browse/SI-5142. If this method is accessible the conflict can be worked around by using HListOps#at instead of HListOps#apply.

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def deepMerge[M <: HList](m: M)(implicit merger: DeepMerger[L, M]): Out

    Returns the deep union of this record and another record.

  10. def extract[E <: HList](implicit extractor: Extractor[L, E]): E

    Extracts super-record from sub-record according to depth subtype relation

  11. def fieldAt(k: Witness)(implicit selector: Selector[L, T]): FieldType[T, Out]

    Returns the value associated with the singleton typed key k.

    Returns the value associated with the singleton typed key k. Only available if this record has a field with with keyType equal to the singleton type k.T.

  12. def fields(implicit fields: Fields[L]): Out

    Returns a HList made of the key-value pairs of this record.

  13. def get(k: Witness)(implicit selector: Selector[L, T]): Out

    Returns the value associated with the singleton typed key k.

    Returns the value associated with the singleton typed key k. Only available if this record has a field with with keyType equal to the singleton type k.T.

  14. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def keys(implicit keys: Keys[L]): Out

    Returns the keys of this record as an HList of singleton typed values.

  17. val l: L
  18. def mapValues(f: Poly)(implicit mapValues: MapValues[f.type, L]): Out

    Maps a higher rank function across the values of this record.

  19. def merge[M <: HList](m: M)(implicit merger: Merger[L, M]): Out

    Returns the union of this record and another record.

  20. def mergeWith[M <: HList](m: M)(f: Poly)(implicit merger: MergeWith[L, M, f.type]): Out

    Returns the union of this record and another record using the provided f to combine the values of fields which are present in both.

    Returns the union of this record and another record using the provided f to combine the values of fields which are present in both.

    The duplicated fields will be merged with f.

  21. def record: DynamicRecordOps[L]

    Returns a wrapped version of this record that provides selectDynamic access to fields.

  22. def remove(k: Witness)(implicit remover: Remover[L, T]): ops.record.Remover.Out

    Remove the field associated with the singleton typed key k, returning both the corresponding value and the updated record.

    Remove the field associated with the singleton typed key k, returning both the corresponding value and the updated record. Only available if this record has a field with keyType equal to the singleton type k.T.

  23. def renameField(oldKey: Witness, newKey: Witness)(implicit renamer: Renamer[L, T, T]): Out

    Rename the field associated with the singleton typed key oldKey.

    Rename the field associated with the singleton typed key oldKey. Only available if this record has a field with keyType equal to the singleton type oldKey.T.

  24. def replace[V](k: Witness, v: V)(implicit ev: Aux[L, T, V], updater: Updater[L, FieldType[T, V]]): Out

    Replaces the value of field k with a value of the same type.

    Replaces the value of field k with a value of the same type. Only available if this record has a field with keyType equal to the singleton type k.T and valueType equal to V.

  25. def toMap[K, V](implicit toMap: Aux[L, K, V]): Map[K, V]

    Returns a Map whose keys and values are typed as the Lub of the keys and values of this record.

  26. def toString(): String
    Definition Classes
    Any
  27. def updateWith[W](k: WitnessWith[FSL])(f: (Out) ⇒ W)(implicit modifier: Modifier[L, WitnessWith.T, Out, W]): Out

    Updates a field having a value with type A by given function.

  28. def updated[V](k: Witness, v: V)(implicit updater: Updater[L, FieldType[T, V]]): Out

    Updates or adds to this record a field with key k.

    Updates or adds to this record a field with key k. The new field has a value of type V. Only available if this record has a field with keyType equal to the singleton type k.T.

  29. def values(implicit values: Values[L]): Out

    Returns a HList of the values of this record.

Inherited from Serializable

Inherited from Serializable

Inherited from AnyVal

Inherited from Any

Ungrouped