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

org.unlaxer.util.copy.Names Maven / Gradle / Ivy

package org.unlaxer.util.copy;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import org.unlaxer.Name;

public class Names{
	
	List names;
	
	String name;

	public Names(List names) {
		super();
		this.names = names;
		name = names.stream().map(Name::toString).collect(Collectors.joining("/"));
	}
	
	public Names(Name... names) {
		this(Arrays.asList(names));
	}
	
	public String toString(){
		return name;
	}
	
	/** 
	 * check equivalent
	 */
	@Override
	public boolean equals(Object other) {
		
		if(other instanceof Names){
			return ((Names)other).toString().equals(toString());
		}
		return false;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy