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

de.retest.ui.descriptors.MutableAttributes Maven / Gradle / Ivy

There is a newer version: 6.0.0
Show newest version
package de.retest.ui.descriptors;

import java.util.TreeMap;

import de.retest.ui.image.Screenshot;

public class MutableAttributes {
	final TreeMap attributes;

	public MutableAttributes() {
		attributes = new TreeMap();
	}

	public MutableAttributes( final Attributes attributes ) {
		this.attributes = new TreeMap( attributes.getMap() );
	}

	public Attributes immutable() {
		return new Attributes( this );
	}

	public void put( final String name, final String criterion ) {
		attributes.put( name, criterion );
	}

	public void put( final String name, final Integer criterion ) {
		attributes.put( name, criterion );
	}

	public void put( final String name, final Boolean criterion ) {
		attributes.put( name, criterion );
	}

	public Object get( final String name ) {
		return attributes.get( name );
	}

	public void put( final Screenshot screenshot ) {
		attributes.put( Attributes.SCREENSHOT, screenshot );
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy