Groovy Documentation

com.xlson.groovycsv
[Groovy] Class PropertyMapper

java.lang.Object
  com.xlson.groovycsv.PropertyMapper

@EqualsAndHashCode
class PropertyMapper
extends java.lang.Object

Maps between column names and values in a list. Uses propertyMissing to allow for named access.

Authors:
Leonard Gram
Since:
0.1


Property Summary
java.lang.Object columns

The columns of the csv.

java.lang.Object values

A list of values for one csv line.

 
Method Summary
java.lang.Object getAt(java.lang.Integer index)

Allows values to be obtained using their position

java.lang.Object propertyMissing(java.lang.String name)

Maps properties to values.

java.util.Map toMap()

java.lang.String toString()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

columns

java.lang.Object columns
The columns of the csv.


values

java.lang.Object values
A list of values for one csv line.


 
Method Detail

getAt

java.lang.Object getAt(java.lang.Integer index)
Allows values to be obtained using their position
Returns:
the value at that position
Parameters:
index


propertyMissing

java.lang.Object propertyMissing(java.lang.String name)
Maps properties to values.
throws:
MissingPropertyException where the values-list doesn't contain enough data.
Returns:
the value as a String
Parameters:
name - the name of the property


toMap

java.util.Map toMap()


toString

java.lang.String toString()


 

Groovy Documentation