public AdvancedStateMap.Builder withName(Function<PropertiesMap,String> mapper){
  this.nameMapper=mapper;
  return this;
}

public AdvancedStateMap . Builder withName ( Function < PropertiesMap , String > mapper ) { this . nameMapper = mapper ; return this ; }
sets the state mapper to set the name to the value returned by the specified mapper
