Package nz.org.riskscape.engine.output
Class StructFlattener.LastMemberNamer
java.lang.Object
nz.org.riskscape.engine.output.StructFlattener.LastMemberNamer
- All Implemented Interfaces:
StructFlattener.Namer
- Enclosing class:
- StructFlattener
A StructFlattener.Namer
that will use the Struct.StructMember.getKey()
from the last segment as the name.
If this name has already been seen then an index is appended. E.g 'name' could become 'name_1'
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
LastMemberNamer
public LastMemberNamer()
-
-
Method Details
-
name
Description copied from interface:StructFlattener.Namer
Get a name for the the given segments.
- Specified by:
name
in interfaceStructFlattener.Namer
- Parameters:
segments
- segments to provide a name for- Returns:
- name to be used for the given segments
-