summaryrefslogblamecommitdiffstats
path: root/src/main/java/org/openslx/virtualization/hardware/AbstractConfigurableOption.java
blob: 9384c8ae5517e19a9facbe2cbefbbac5136c5ee1 (plain) (tree)









































                                                                                                         
package org.openslx.virtualization.hardware;

public abstract class AbstractConfigurableOption
{

	protected final String id;

	protected final String displayName;

	public AbstractConfigurableOption( String id, String displayName )
	{
		this.id = id;
		this.displayName = displayName;
	}

	public String getId()
	{
		return this.id;
	}

	public String getDisplayName()
	{
		return this.displayName;
	}

	public abstract void apply();
	
	public abstract boolean isActive();

	@Override
	public boolean equals( Object obj )
	{
		if ( this == obj )
			return true;
		if ( obj instanceof AbstractConfigurableOption ) {
			AbstractConfigurableOption other = ( (AbstractConfigurableOption)obj );
			return other.id == this.id || ( other.id != null && other.id.equals( this.id ) );
		}
		return false;
	}

}