org.unlaxer.jaddress.parser._BuildingHierarchyResolverResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of japanese-address-parser Show documentation
Show all versions of japanese-address-parser Show documentation
a simplejapanese address parser
The newest version!
package org.unlaxer.jaddress.parser;
import java.util.Set;
import java.util.SortedSet;
import java.util.StringJoiner;
import java.util.TreeSet;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import org.unlaxer.jaddress.entity.standard.建物階層;
import org.unlaxer.util.collection.Comparators;
public class _BuildingHierarchyResolverResult implements 建物階層Holder , 建物名Holder{
final Supplier<建物階層> _建物階層;
final SortedSet buildingNames;
public _BuildingHierarchyResolverResult(Supplier<建物階層> _建物階層, Set buildingNames) {
super();
this._建物階層 = _建物階層;
this.buildingNames = new TreeSet(Comparators.longerIsFirst);
this.buildingNames.addAll(buildingNames);
}
public _BuildingHierarchyResolverResult(Supplier<建物階層> _建物階層) {
super();
this._建物階層 = _建物階層;
this.buildingNames = new TreeSet();
}
public String toString() {
return new StringJoiner(",","{","}")
.add("建物階層:'"+_建物階層.get().name()+ "'")
.add("buildingNames:"+
buildingNames.stream()
.map(x->"'" + x + "'")
.collect(Collectors.joining(",", "[", "]"))
).toString();
}
@Override
public 建物階層 建物階層() {
if(_建物階層 == null) {
return 建物階層.不明;
}
return _建物階層.get();
}
public SortedSet buildingNames(){
return buildingNames;
}
@Override
public SortedSet buidingNames() {
return buildingNames;
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy