All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unlaxer.jaddress.parser.AddressContext Maven / Gradle / Ivy

package org.unlaxer.jaddress.parser;

import java.util.List;
import java.util.Map;
import java.util.Optional;

import org.unlaxer.jaddress.entity.standard.IDHolder;
import org.unlaxer.jaddress.entity.standard.SingleOrRange階層要素;
import org.unlaxer.jaddress.entity.standard.郵便番号;
import org.unlaxer.jaddress.entity.standard.階層要素;
import org.unlaxer.util.collection.ID;
import org.unlaxer.util.collection.TreeNode;
import org.unlaxer.util.collection.TreeNodeList;

public interface AddressContext extends  IDHolder {

	String SEPARATOR = " ";

	void addChildren(TreeNode target, TreeNodeList children);

	void addChild(TreeNode target, TreeNode child);

	void addChild(TreeNode target, AddressElement child);

	void addChild(int index, TreeNode target, AddressElement child);

	Optional> find(IDHolder hierarchyElement);
	
	Map<階層要素, AddressElement> 丁目以降枝番までAsMap();
	
	List 丁目以降枝番までAsList();
	
	Sources sources();

	郵便番号 zip();
	
	StringAndCharacterKinds addressString();
	
	TreeNode addressTree();

	TreeNodeList split(
			TreeNode targetNode, 
			SeparatorWithKind separatorWithKind,
			SplitStrategy splitStrategy, 
			SingleOrRange階層要素...  elementKinds);

	
	
	public static AddressContext create(ID id , 郵便番号 zip, List addresses) {
		return new AddressContextImpl(
			id, 
			zip, 
			addresses);
	}
	
	public static AddressContext create(郵便番号 zip, List addresses) {
		return create(ID.generate() , zip, addresses);
	}

	static AddressContext create(ID id, 郵便番号 zip, AddressElement addressElement) {
		return new AddressContextImpl(
			id, 
			zip, 
			addressElement);
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy