org.tools4j.groovytables.FieldSetPrecursor.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of groovy-tables Show documentation
Show all versions of groovy-tables Show documentation
A groovy API which allows you to create lists of objects using a table like grammar.
package org.tools4j.groovytables
import groovy.transform.ToString;
/**
* User: ben
* Date: 14/03/2016
* Time: 6:35 AM
*/
@ToString
class FieldSetPrecursor {
final Suitability suitability
final Object coercedArg
final FieldSetMethod fieldSetMethod
final static FieldSetPrecursor NOT_SUITABLE = new FieldSetPrecursor(Suitability.NOT_SUITABLE, null, null)
FieldSetPrecursor(final Suitability suitability, final Object coercedArg, FieldSetMethod fieldSetMethod) {
this.suitability = suitability
this.coercedArg = coercedArg
this.fieldSetMethod = fieldSetMethod
}
boolean isMoreSuitableThan(FieldSetPrecursor fieldSetMethod){
return getSuitability().isMoreSuitableThan(fieldSetMethod.suitability)
}
}