package constraint
- Alphabetic
- Public
- Protected
Type Members
- trait AppendConstraint[-A, -B, +R] extends AnyRef
Typeclass to append two objects.
Typeclass to append two objects.
Author:
Harshad Deo
- A
type of object in the front
- B
type of object in the rear
- R
type of the result
- Since
0.1
- trait ApplyConstraint[F, In, Out] extends AnyRef
Typeclass for function application.
Typeclass for function application.
Author:
Harshad Deo
- F
Type of the Function
- In
Type of the Input
- Out
Type Output
- Since
0.1
- trait AtConstraint[N, HL, At] extends AnyRef
Typeclass to get an element given an index.
Typeclass to get an element given an index. For sequentially indexed objects like HList and Tuples, index is, by convention, 0-based from the beginning.
Author:
Harshad Deo
- N
Type of the Index
- HL
Type of the object from which the element is retrieved
- At
Type of the result
- Since
0.1
- trait AtRightConstraint[N, HL, A] extends AnyRef
Typeclass to get an element from an object that supports sequential indexing, like HList and Tuples.
Typeclass to get an element from an object that supports sequential indexing, like HList and Tuples. By convention, the index is 0-based and from the right or the end.
Author:
Harshad Deo
- N
Type of the index
- HL
Type of the object from which the element is retrieved
- A
Type of the result
- Since
0.1
- trait ConsConstraint[T, U, R] extends AnyRef
Typeclass to add an element at the head of an object.
Typeclass to add an element at the head of an object.
Author:
Harshad Deo
- T
Type of the head
- U
Type of the object to which the consing is done
- R
Type of the result
- Since
0.1
- trait CountConstraint[T, C] extends AnyRef
Typeclass to count the number of elements satisfying a given predicate, given that each element of the object can be converted implicitly to a common class C.
Typeclass to count the number of elements satisfying a given predicate, given that each element of the object can be converted implicitly to a common class C. Default implementation is provided in the companion object.
Author:
Harshad Deo
- T
Type of the object on which the count operation is applied, like a HList or a Tuple
- C
Common type to which the elements of T can be converted
- Since
0.1
- trait DownTransformConstraint[-INP, +OP, +M[_]] extends AnyRef
Typeclass to remove all elements of an object from their context, for example converting.
Typeclass to remove all elements of an object from their context, for example converting.
List[Int] :+: List[String] :+: HNil to Int :+: String :+: HNil.
Is a dangerous operation and should be used with caution and the appropriate guards.
Author:
Harshad Deo
- INP
Type of the object whose elements are to be downtransformed
- OP
Type of the resulting object
- M
Type of the context
- Since
0.1
- trait DropConstraint[N, HL, R] extends AnyRef
Typeclass to remove a type-indexed number of elements from the left of a sequentially indexed object, like a HList or a tuple.
Typeclass to remove a type-indexed number of elements from the left of a sequentially indexed object, like a HList or a tuple. By convention, indexes are 0-based.
Author:
Harshad Deo
- N
Type index of the elements to be dropped
- HL
Type of the object from which the elements are to be dropped
- R
Type of the result
- Since
0.1
- trait DropRightConstraint[N, HL, R] extends AnyRef
Typeclass to remove a type-indexed number of elements from the right of a sequentially indexed object, like a HList or a tuple.
Typeclass to remove a type-indexed number of elements from the right of a sequentially indexed object, like a HList or a tuple. By convention, indexes are 0-based.
Author:
Harshad Deo
- N
Type index of the elements to be dropped
- HL
Type of the object from which the elements are to be dropped
- R
Type of the result
- Since
0.1
- trait ExistsConstraint[T, C] extends AnyRef
Typeclass to check if an element satisfies a given predicate given that each element of the object can be implicitly converted to a type C.
Typeclass to check if an element satisfies a given predicate given that each element of the object can be implicitly converted to a type C. Default implementation is provided in the companion object.
Author:
Harshad Deo
- T
Type of the object on which the exists operation is applied, like a hlist or a tuple
- C
Common type to which all elements of T can be converted
- Since
0.1
- trait ExternalUnzipConstraint[-H, +R1, +R2] extends AnyRef
Typeclass to unzip the elements of an object into two object, for example an HList of Tuple2s into two HLists.
Typeclass to unzip the elements of an object into two object, for example an HList of Tuple2s into two HLists.
Author:
Harshad Deo
- H
Type of the input object
- R1
Type of the first object obtained by unzipping
- R2
type of the second object obtained by unzipping
- Since
0.1
- trait ExternalZipConstraint[-A, -B, +R] extends AnyRef
Typeclass to zip the elements of two objects, as opposed to zipping all the elements of one object, which is done by the InternalZipConstraint typeclass.
Typeclass to zip the elements of two objects, as opposed to zipping all the elements of one object, which is done by the InternalZipConstraint typeclass.
Author:
Harshad Deo
- A
Type of the first object to be zipped
- B
Type of the second object to be zipped
- R
Type of the result of zipping
- Since
0.1
- final class FalseConstraint[T] extends AnyRef
- trait FalseConstraintLowPriority extends AnyRef
- trait FoldLeftConstraint[T, Z, C] extends AnyRef
Typeclass to implement a fold-left style on an object, given that all elements of the object can be implicitly converted to a type C.
Typeclass to implement a fold-left style on an object, given that all elements of the object can be implicitly converted to a type C. Default implementation is provided in the companion object.
Author:
Harshad Deo
- T
Type of the object on which the fold left operation is applied
- Z
Type of the result of the left fold
- C
Common class to which all elements of T can be converted
- Since
0.1
- trait ForallConstraint[T, C] extends AnyRef
Typeclass to check whether a given predicate holds for all elements of an object, given that each element of the object can be implicitly converted to a type C.
Typeclass to check whether a given predicate holds for all elements of an object, given that each element of the object can be implicitly converted to a type C. Default implementation is provided in the companion object.
Author:
Harshad Deo
- T
Type of the object on which the operation is being applied
- C
Common class to which all elements of the object can be converted
- Since
0.1
- trait ForeachConstraint[INP, C] extends AnyRef
Typeclass to apply an operation to each element of an object, given that all elements of the object can be implicitly converted to a common class C.
Typeclass to apply an operation to each element of an object, given that all elements of the object can be implicitly converted to a common class C.
Author:
Harshad Deo
- INP
Type of the object to which the operation is being applied
- C
Common class to which all the elements of the object can be converted
- Since
0.1
- trait IndexFlatMapConstraint[N, HL, At, T, R] extends AnyRef
Typeclass to map an object at a type-index and then "flatten" the result, conceptually similar to a flatmap By convention, indices are 0-based from the left (beginning).
Typeclass to map an object at a type-index and then "flatten" the result, conceptually similar to a flatmap By convention, indices are 0-based from the left (beginning).
Author:
Harshad Deo
- N
Index at which insertion happens
- HL
Type of the object on which the operation is applied
- At
Type of the object at index specified by N
- T
Type of the result of applying the mapping function
- R
Type of the resulting object
- Since
0.1
- trait IndexFlatMapRightConstraint[N, HL, At, T, R] extends AnyRef
Typeclass to map an object at a type-index and then "flatten" the result, conceptually similar to a flatmap By convention, indices are 0-based from the right (end).
Typeclass to map an object at a type-index and then "flatten" the result, conceptually similar to a flatmap By convention, indices are 0-based from the right (end).
Author:
Harshad Deo
- N
Index at which insertion happens
- HL
Type of the object on which the operation is applied
- At
Type of the object at index specified by N
- T
Type of the result of applying the mapping function
- R
Type of the resulting object
- Since
0.1
- trait IndexMapConstraint[N, HL, A, T, R] extends AnyRef
Typeclass to map an object at a type-index, conceptually similar to a map.
Typeclass to map an object at a type-index, conceptually similar to a map. By convention, indices are 0-based from the left (beginning).
Author:
Harshad Deo
- N
Index at which insertion happens
- HL
Type of the object on which the operation is applied
- A
Type of the object at index specified by N
- T
Type of the result of applying the mapping function
- R
Type of the resulting object
- Since
0.1
- trait IndexMapRightConstraint[N, HL, At, T, R] extends AnyRef
Typeclass to map an object at a type-index, conceptually similar to a map.
Typeclass to map an object at a type-index, conceptually similar to a map. By convention, indices are 0-based from the right (end).
Author:
Harshad Deo
- N
Index at which insertion happens
- HL
Type of the object on which the operation is applied
- At
Type of the object at index specified by N
- T
Type of the result of applying the mapping function
- R
Type of the resulting object
- Since
0.1
- trait InsertConstraint[N, HL, T, R] extends AnyRef
Typeclass to insert an element at a specified type-index.
Typeclass to insert an element at a specified type-index. By convention, indices are 0-based from the left (beginning).
Author:
Harshad Deo
- N
Index at which the element is to be inserted
- HL
Type of the object in which the insertion is taking place
- T
Type of the object being inserted
- R
Type of the result
- Since
0.1
- trait InsertMConstraint[N, HL, T, R] extends AnyRef
Typeclass to insert multiple elements at a specified type-index.
Typeclass to insert multiple elements at a specified type-index. By convention, indices are 0-based from the left (beginning).
Author:
Harshad Deo
- N
Index at which the element is to be inserted
- HL
Type of the object in which the insertion is taking place
- T
Type of the object being inserted
- R
Type of the result
- Since
0.1
- trait InsertMRightConstraint[N, HL, T, R] extends AnyRef
Typeclass to insert multiple elements at a specified type-index.
Typeclass to insert multiple elements at a specified type-index. By convention, indices are 0-based from the right(end).
Author:
Harshad Deo
- N
Index at which the element is to be inserted
- HL
Type of the object in which the insertion is taking place
- T
Type of the object being inserted
- R
Type of the result
- Since
0.1
- trait InsertRightConstraint[N, HL, T, R] extends AnyRef
Typeclass to insert an element at a specified type-index.
Typeclass to insert an element at a specified type-index. By convention, indices are 0-based from the right (end).
Author:
Harshad Deo
- N
Index at which the element is to be inserted
- HL
Type of the object in which the insertion is taking place
- T
Type of the object being inserted
- R
Type of the result
- Since
0.1
- trait InternalZipConstraint[Z, F, T, V] extends AnyRef
Typeclass to zip all the elements of an object together, equivalent to an arbitrary-arity zip.
Typeclass to zip all the elements of an object together, equivalent to an arbitrary-arity zip.
Author:
Harshad Deo
- Z
Type of the object on which the operation is applied
- F
Downconverted type of Z, for details, see DownTransformConstraint
- T
The element type of the resulting object
- Since
0.1
- trait LengthConstraint[HL, L <: Dense] extends AnyRef
Marker trait for typelevel length.
Marker trait for typelevel length.
Author:
Harshad Deo
- HL
Type of the object for which the length is being computed
- L
Length
- Since
0.1
- trait ListBuilderConstraint[T, LB] extends AnyRef
Typeclass to convert an object to a list.
Typeclass to convert an object to a list. Differs from ToListConstraint in that in practice, the lower bound will be constrained by another typeclass. To implicitly obtain a typeclass with the LB constrained, see ToListConstraint.
Author:
Harshad Deo
- T
Type of the object being converted
- LB
Element type of the resulting list
- Since
0.1
- trait LubConstraint[I, R] extends AnyRef
Marker trait for the Lease Uppper Bound Type for all elements of an object.
Marker trait for the Lease Uppper Bound Type for all elements of an object.
Author:
Harshad Deo
- I
Type of the object
- R
Lease Upper Bound
- Since
0.1
- trait RemoveConstraint[N, HL, R] extends AnyRef
Typeclass to remove an element at a specified type-index.
Typeclass to remove an element at a specified type-index. By convention, indices are 0-based from the left (beginning).
Author:
Harshad Deo
- N
Index at which the element is to be inserted
- HL
Type of the object in which the insertion is taking place
- R
Type of the result
- Since
0.1
- trait RemoveRightConstraint[N, HL, R] extends AnyRef
Typeclass to remove an element at a specified type-index.
Typeclass to remove an element at a specified type-index. By convention, indices are 0-based from the right (end).
Author:
Harshad Deo
- N
Index at which the element is to be inserted
- HL
Type of the object in which the insertion is taking place
- R
Type of the result
- Since
0.1
- trait ReverseConstraint[A, R] extends AnyRef
Typeclass to reverse a sequentially indexed object, like a HList or a tuple.
Typeclass to reverse a sequentially indexed object, like a HList or a tuple.
Author:
Harshad Deo
- A
Type of the object being reversed
- R
Type of the reversed object
- Since
0.1
- trait SIAddConstraint[N, S, U, R] extends AnyRef
Typeclass to add an element at a string indexed collection, like a StringIndexedCollection or a Record.
Typeclass to add an element at a string indexed collection, like a StringIndexedCollection or a Record.
Author:
Harshad Deo
- N
Index at which to add (ValueHash of the key)
- S
Type of original collection
- U
Type of the object being added
- R
Type of the resultant collection
- Since
0.1
- trait SplitAtConstraint[N, HL, L, R] extends AnyRef
Typeclass to split a sequentially indexed collection (like a HList or a tuple) at a specified index.
Typeclass to split a sequentially indexed collection (like a HList or a tuple) at a specified index. By Convention, indices are 0-based and begin from the left (beginning).
Author:
Harshad Deo
- N
Index at which to split
- HL
Type of the object to split
- L
Type of the first object obtained by splitting
- R
Type of the second object obtained by splitting
- Since
0.1
- trait SplitAtRightConstraint[N, HL, L, R] extends AnyRef
Typeclass to split a sequentially indexed collection (like a HList or a tuple) at a specified index.
Typeclass to split a sequentially indexed collection (like a HList or a tuple) at a specified index. By Convention, indices are 0-based and begin from the right (end).
Author:
Harshad Deo
- N
Index at which to split
- HL
Type of the object to split
- L
Type of the first object obtained by splitting
- R
Type of the second object obtained by splitting
- Since
0.1
- trait TakeConstraint[N, HL, R] extends AnyRef
Typeclass to take a type-indexed number of elements from the left of a sequentially indexed object, like a HList or a tuple.
Typeclass to take a type-indexed number of elements from the left of a sequentially indexed object, like a HList or a tuple. By convention, indexes are 0-based.
Author:
Harshad Deo
- N
Type index of the elements to be dropped
- HL
Type of the object from which the elements are to be dropped
- R
Type of the result
- Since
0.1
- trait TakeRightConstraint[N, HL, R] extends AnyRef
Typeclass to take a type-indexed number of elements from the right of a sequentially indexed object, like a HList or a tuple.
Typeclass to take a type-indexed number of elements from the right of a sequentially indexed object, like a HList or a tuple. By convention, indexes are 0-based.
Author:
Harshad Deo
- N
Type index of the elements to be dropped
- HL
Type of the object from which the elements are to be dropped
- R
Type of the result
- Since
0.1
- trait ToListConstraint[T, +R] extends AnyRef
Typeclass to convert an object into a list, default implementation is provided in the companion object.
Typeclass to convert an object into a list, default implementation is provided in the companion object. Differs from ListBuilderConstraint in that this is typically not built using structural induction, rather uses LubConstraint to fix a lower bound and a ListBuilderConstraint to do the conversion given the lower bound.
Author:
Harshad Deo
- T
Type of the object being constructed
- R
Element type of resultant list
- Since
0.1
- trait ToMapConstraint[S, +R] extends AnyRef
Typeclass to convert an object, such as a Record or a StringIndexedCollection to a map.
Typeclass to convert an object, such as a Record or a StringIndexedCollection to a map.
Author:
Harshad Deo
- S
Type of the object being converted
- R
Type of the resultant map
- Since
0.1
- trait TransformConstraint[-INP, +OP, +M[_], -N[_]] extends AnyRef
Typeclass to apply a natural transformation to an object.
Typeclass to apply a natural transformation to an object.
Author:
Harshad Deo
- INP
Type of the input
- OP
Type of the output
- M
Input of the transformation
- N
Output of the transformation
- Since
0.1
- final class TrueConstraint[T] extends AnyRef
- trait TrueConstraintLowPriority extends AnyRef
- trait UpdatedConstraint[N, HL, A, R] extends AnyRef
Typeclass to update an element at a given type index.
Typeclass to update an element at a given type index. By convention, indices are 0-based and begin at the left.
Author:
Harshad Deo
- N
Type index at which to update
- HL
Type of the object to update
- A
Type of the new object at the position
- R
Type of the resultant object
- Since
0.1
- trait UpdatedRightConstraint[N, HL, A, R] extends AnyRef
Typeclass to update an element at a given type index.
Typeclass to update an element at a given type index. By convention, indices are 0-based and begin at the right.
Author:
Harshad Deo
- N
Type index at which to update
- HL
Type of the object to update
- A
Type of the new object at the position
- R
Type of the resultant object
- Since
0.1
Value Members
- object CountConstraint
Companion object for the CountConstraint trait.
Companion object for the CountConstraint trait. Contains a default implementation based on the ForeachConstraint
Author:
Harshad Deo
- Since
0.1
- object ExistsConstraint
Companion object for ExistsConstraint.
Companion object for ExistsConstraint. Contains a default implementation based on the ForeachConstraint
Author:
Harshad Deo
- Since
0.1
- object FalseConstraint extends FalseConstraintLowPriority
- object FoldLeftConstraint
Companion object for the FoldLeftConstraint trait.
Companion object for the FoldLeftConstraint trait. Contains a default implementation based on the ForeachConstraint
Author:
Harshad Deo
- Since
0.1
- object ForallConstraint
Companion object for the ForallConstraint trait.
Companion object for the ForallConstraint trait. Contains a default implementation based on the ForeachConstraint
Author:
Harshad Deo
- Since
0.1
- object ToListConstraint
Companion object for ToListConstraint.
Companion object for ToListConstraint. Contains default implementation in terms of LubConstraint and ListBuilderConstraint.
Author:
Harshad Deo
- Since
0.1
- object TrueConstraint extends TrueConstraintLowPriority