de.cau.cs.kieler.sim.kiem.config.data
Class EditorDefinition

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.config.data.EditorDefinition
All Implemented Interfaces:
Serializable, Comparable<EditorDefinition>

public class EditorDefinition
extends Object
implements Comparable<EditorDefinition>, Serializable

Definition class for the editor. Contains the name of the editor and an editor id.

See Also:
Serialized Form
Rating proposed yellow
(2010-01-27)

Constructor Summary
EditorDefinition(String newName, EditorIdWrapper newEditorId)
          Create a new definition.
 
Method Summary
 int compareTo(EditorDefinition o)
          Compares this with another Object.
 boolean equals(Object o)
          
static EditorDefinition fromString(String input)
          Parse a new definition from an input string created by a toSerialString() call.
 EditorIdWrapper getEditorId()
          Returns the editor id belonging to this editor.
 String getName()
          Getter for the editor name.
 int hashCode()
          
 boolean isLocked()
          Getter for the isLocked.
 void setLocked(boolean isLockedParam)
          Setter for the isLocked.
 boolean supports(EditorIdWrapper anotherId)
          Determines if the given editor id is supported by this definition.
 boolean supports(String anotherEditorId)
          Determines if the given editor id is supported by this definition.
 String toSerialString()
          Construct a String for Serialization.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EditorDefinition

public EditorDefinition(String newName,
                        EditorIdWrapper newEditorId)
Create a new definition.

Parameters:
newName - the name of the new definition.
newEditorId - the id of the editor.
Method Detail

getEditorId

public EditorIdWrapper getEditorId()
Returns the editor id belonging to this editor.

Returns:
the editor id

getName

public String getName()
Getter for the editor name.

Returns:
the name of the editor

isLocked

public boolean isLocked()
Getter for the isLocked.

Returns:
the isLocked

setLocked

public void setLocked(boolean isLockedParam)
Setter for the isLocked.

Parameters:
isLockedParam - the isLocked to set

supports

public boolean supports(EditorIdWrapper anotherId)
Determines if the given editor id is supported by this definition.

Parameters:
anotherId - the id to look for.
Returns:
true if the editor is supported, false if not.

supports

public boolean supports(String anotherEditorId)
Determines if the given editor id is supported by this definition.

Parameters:
anotherEditorId - the id to look for.
Returns:
true if the editor is supported, false if not.

fromString

public static EditorDefinition fromString(String input)
Parse a new definition from an input string created by a toSerialString() call.

Parameters:
input - the input string
Returns:
the parsed object

toSerialString

public String toSerialString()
Construct a String for Serialization.

Returns:
the string

toString

public String toString()

Overrides:
toString in class Object

compareTo

public int compareTo(EditorDefinition o)
Compares this with another Object. Returns -1 if this object is smaller, 0 if both objects are equal and 1 if this object is bigger.

Specified by:
compareTo in interface Comparable<EditorDefinition>
Parameters:
o - the object to compare with
Returns:
one of the values -1, 0, 1

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object