summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/virtualization/hardware/AbstractConfigurableOption.java
blob: 9384c8ae5517e19a9facbe2cbefbbac5136c5ee1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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;
	}

}