graph.Vertex.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graph-dsl Show documentation
Show all versions of graph-dsl Show documentation
A groovy dsl for creating and traversing graphs.
package graph
import groovy.transform.EqualsAndHashCode
@EqualsAndHashCode(excludes = ['delegate'])
class Vertex {
String name
def delegate = new Object()
def delegateAs(Class>... traits) {
delegate = delegate.withTraits(traits)
this
}
def propertyMissing(String name) {
delegate[name]
}
def propertyMissing(String name, value) {
delegate[name] = value
}
}