summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/virtualization/hardware/VirtOptionValue.java
blob: effc51f86dc9b0f54f740a2ed1c55196a9e78c51 (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 VirtOptionValue
{

	protected final String id;

	protected final String displayName;

	public VirtOptionValue( 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 VirtOptionValue ) {
			VirtOptionValue other = ( (VirtOptionValue)obj );
			return other.id == this.id || ( other.id != null && other.id.equals( this.id ) );
		}
		return false;
	}

}