The AttributeSet object provides utility methods for constructing and parsing instances of the AttributeSet class. This is primarily used for handling a column in a table that represents a set of attributes, typically formatted as a comma-separated list, and potentially enclosed in brackets or other separators.
Attributes
- Companion
- class
- Graph
-
- Supertypes
-
trait Producttrait Mirrortrait CsvRendererstrait CsvGeneratorstrait CellParsersclass Objecttrait Matchableclass AnyShow all
- Self type
-
AttributeSet.type
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The names of the product elements.
Attributes
- Inherited from:
- Mirror
The name of the type.
The name of the type.
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
This method is required to be a String=>AttributeSet and is only invoked inside Try. It invokes parse to get its result.
This method is required to be a String=>AttributeSet and is only invoked inside Try. It invokes parse to get its result.
NOTE: essentially, we are doing a get, and trying to make it explicit so that Codacy doesn't get upset ;)
Value parameters
- w
-
the String to be converted to an AttributeSet.
Attributes
- Returns
-
an AttributeSet.
Method to parse a String as an AttributeSet.
Method to parse a String as an AttributeSet.
Value parameters
- w
-
the String to be parsed as an AttributeSet.
Attributes
- Returns
-
a Try[AttributeSet]
Inherited methods
Method to return a CellParser[T] based on a function to convert a P into a T
Method to return a CellParser[T] based on a function to convert a P into a T
Type parameters
- P
-
the type of the intermediate type.
- T
-
the underlying type of the result.
Value parameters
- construct
-
a function P => T.
Attributes
- Returns
-
a SingleCellParser which converts a String into the intermediate type P and thence into a T
- Inherited from:
- CellParsers
Method to return a CellParser[T] where T is a 2-ary Product and which is based on a function to convert a (K,P) into a T. This method differs from cellParser2 in that the parser of P (a CellParser[P]) is not found implicitly, but rather is looked up dynamically depending on the value of the first parameter (of type K).
Method to return a CellParser[T] where T is a 2-ary Product and which is based on a function to convert a (K,P) into a T. This method differs from cellParser2 in that the parser of P (a CellParser[P]) is not found implicitly, but rather is looked up dynamically depending on the value of the first parameter (of type K).
Type parameters
- K
-
the type of the conditional lookup key, which is also the type of the first field of
T. Typically, this will be aString, but it could also be an Int or something more exotic. - P
-
the type of the second field of the Product type
T. - T
-
the underlying type of the result, a case class with two fields.
Value parameters
- construct
-
a function
(K,P) => T, usually the apply method of a case class. - helper
-
the ColumnHelper[T].
- m
-
the Mirror of T, from which the field names come.
- parsers
-
a
Map[K, CellParser[P]]which determines which particular parser ofPwill be used. The key value looked up is the value of the first (K) field.
Attributes
- Returns
-
a
MultiCellParserwhich converts Strings from a Row into the field typesKandPand thence into aT. - Inherited from:
- CellParsers
Method to return a CellParser[Option[P]].
Method to return a CellParser[Option[P]].
This class is used for optional types which are non-scalar, i.e., there are no implicitly defined parsers for the Option[P].
Type parameters
- P
-
the underlying type of the result
Attributes
- Returns
-
a
SingleCellParser[Option[P]] - Inherited from:
- CellParsers
Method to return a CellParser[Seq[P]] from a potentially unlimited set of P objects. The counting of the elements starts at start (defaults to 1).
Method to return a CellParser[Seq[P]] from a potentially unlimited set of P objects. The counting of the elements starts at start (defaults to 1).
Type parameters
- P
-
the underlying type of the result
Attributes
- Returns
-
a MultiCellParser[Seq[P]
- Inherited from:
- CellParsers
Method to return a CellParser[Seq[P]. This is used only by unit tests. CONSIDER eliminating this; only used in unit tests
Method to return a CellParser[Seq[P]. This is used only by unit tests. CONSIDER eliminating this; only used in unit tests
Type parameters
- P
-
the underlying type of the result
Attributes
- Returns
-
a MultiCellParser[Seq[P]
- Inherited from:
- CellParsers
Method to yield a ColumnHelper[T] based on some number of explicit aliases,
Method to yield a ColumnHelper[T] based on some number of explicit aliases,
Type parameters
- T
-
the underlying type of the resulting ColumnHelper
Value parameters
- aliases
-
a variable number of explicit aliases to translate specific case class parameter names into their column name equivalents.
Attributes
- Returns
-
a new instance of ColumnHelper[T]
- Inherited from:
- CellParsers
Method to yield a ColumnHelper[T] based on a column name mapper, an optional prefix, and some number of explicit aliases,
Method to yield a ColumnHelper[T] based on a column name mapper, an optional prefix, and some number of explicit aliases,
Type parameters
- T
-
the underlying type of the resulting ColumnHelper
Value parameters
- aliases
-
a variable number of explicit aliases to translate specific case class parameter names into their column name equivalents.
- columnNameMapper
-
a mapper of String=>String which will translate case class parameter names into column names.
- maybePrefix
-
an optional prefix for the column name.
Attributes
- Returns
-
a new instance of ColumnHelper[T]
- Inherited from:
- CellParsers
Method to yield a ColumnHelper[T] based on a column name mapper, and some number of explicit aliases,
Method to yield a ColumnHelper[T] based on a column name mapper, and some number of explicit aliases,
Type parameters
- T
-
the underlying type of the resulting ColumnHelper
Value parameters
- aliases
-
a variable number of explicit aliases to translate specific case class parameter names into their column name equivalents.
- columnNameMapper
-
a mapper of String=>String which will translate case class parameter names into column names.
Attributes
- Returns
-
a new instance of ColumnHelper[T]
- Inherited from:
- CellParsers
Method to yield a ColumnHelper[T] based on an optional prefix, and some number of explicit aliases,
Method to yield a ColumnHelper[T] based on an optional prefix, and some number of explicit aliases,
Type parameters
- T
-
the underlying type of the resulting ColumnHelper
Value parameters
- aliases
-
a variable number of explicit aliases to translate specific case class parameter names into their column name equivalents.
- maybePrefix
-
an optional prefix for the column name.
Attributes
- Returns
-
a new instance of ColumnHelper[T]
- Inherited from:
- CellParsers
Method to return a CsvGenerator[ Option[T] ].
Method to return a CsvGenerator[ Option[T] ].
Type parameters
- T
-
the underlying type of the first parameter of the input to the render method.
Attributes
- Returns
-
a CsvGenerator[ Option[T] ].
- Inherited from:
- CsvGenerators
Method to return a CsvGenerator[Option[T]] whose columns are those of T. Use this for an optional field whose type has several columns (e.g. a case class), together with CsvRenderers.optionProductRenderer. (optionGenerator gives an Option just one column.)
Method to return a CsvGenerator[Option[T]] whose columns are those of T. Use this for an optional field whose type has several columns (e.g. a case class), together with CsvRenderers.optionProductRenderer. (optionGenerator gives an Option just one column.)
Type parameters
- T
-
the underlying type.
Value parameters
- g
-
the CsvGenerator[T].
Attributes
- Returns
-
a CsvGenerator[Option[T]].
- Inherited from:
- CsvGenerators
Method to return a CsvRenderer[Option[T]] for a T which has several columns (e.g. a case class). None is rendered as the right number of empty cells, so that the columns which follow stay aligned. Use this together with CsvGenerators.optionProductGenerator. (optionRenderer renders None as just one cell.)
Method to return a CsvRenderer[Option[T]] for a T which has several columns (e.g. a case class). None is rendered as the right number of empty cells, so that the columns which follow stay aligned. Use this together with CsvGenerators.optionProductGenerator. (optionRenderer renders None as just one cell.)
Type parameters
- T
-
the underlying type.
Value parameters
- ca
-
the CsvAttributes.
- g
-
the CsvGenerator[T], which determines how many columns a T has.
- r
-
the CsvRenderer[T].
Attributes
- Returns
-
a CsvRenderer[Option[T]].
- Inherited from:
- CsvRenderers
Method to return a CsvRenderer[ Option[T] ].
Method to return a CsvRenderer[ Option[T] ].
Type parameters
- T
-
the underlying type of the first parameter of the input to the render method.
Value parameters
- ca
-
the (implicit) CsvAttributes.
Attributes
- Returns
-
a CsvRenderer[ Option[T] ].
- Inherited from:
- CsvRenderers
Method to return a CellParser[RawRow] from a Row.
Method to return a CellParser[RawRow] from a Row.
Attributes
- Returns
-
a CellParser[RawRow]
- Inherited from:
- CellParsers
Method to return a CsvRenderer[RawRow].
Method to return a CsvRenderer[RawRow].
Value parameters
- ca
-
the (implicit) CsvAttributes.
Attributes
- Returns
-
a CsvRenderer[RawRow].
- Inherited from:
- CsvRenderers
Method to return a CsvGenerator[ Seq[T] ].
Method to return a CsvGenerator[ Seq[T] ].
Type parameters
- T
-
the underlying type of the first parameter of the input to the render method.
Attributes
- Returns
-
a CsvGenerator[ Seq[T] ]
- Inherited from:
- CsvGenerators
Method to return a CsvRenderer[ Seq[T] ].
Method to return a CsvRenderer[ Seq[T] ].
Type parameters
- T
-
the underlying type of the first parameter of the input to the render method.
Value parameters
- ca
-
the (implicit) CsvAttributes.
Attributes
- Returns
-
a CsvRenderer[ Seq[T] ]
- Inherited from:
- CsvRenderers
Method to return a CsvGenerator[T] which does not output a column header for at all.
Method to return a CsvGenerator[T] which does not output a column header for at all.
Type parameters
- T
-
the type of the column objects.
Attributes
- Returns
-
a CsvGenerator[T].
- Inherited from:
- CsvGenerators
Method to return a CsvRenderer[T] which does not output a T at all, only a number of delimiters according to the value of alignment.
Method to return a CsvRenderer[T] which does not output a T at all, only a number of delimiters according to the value of alignment.
Type parameters
- T
-
the type of the parameter to the render method.
Value parameters
- alignment
-
(defaults to 1): one more than the number of delimiters to output. If you are skipping a Product (such as a case class instance), then you should carefully count up how many (nested) elements to skip. So, for example, if you are skipping a Product with three members, you would set alignment = 3, even though you only want to output 2 delimiters.
- ca
-
the (implicit) CsvAttributes.
Attributes
- Returns
-
a CsvRenderer[T].
- Inherited from:
- CsvRenderers
Concrete fields
Inherited fields
Method to return a CellParser[Option[String].
Method to return a CellParser[Option[String].
TODO: why do we need this in addition to cellParserOption?
CONSIDER: using BlankException as above...
Attributes
- Returns
-
a SingleCellParser[Option[String]
- Inherited from:
- CellParsers
Givens
Givens
Inherited givens
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators