de.unibi.techfak.misc
Class Marker

java.lang.Object
  extended by de.unibi.techfak.misc.Marker
All Implemented Interfaces:
Markable

public class Marker
extends java.lang.Object
implements Markable

This class is the implementation of the Markable interface.


Field Summary
private  int mark
          The mark variable containing the markers set.
 
Fields inherited from interface de.unibi.techfak.misc.Markable
MARK_BASIC, MARK_DELETED, MARK_EXP, MARK_MOVED, MARK_REPLACED, MARK_SELECTED, MARK_TOBEDELETED, MARK_TOBEMOVED, MARK_TOBEREPLACED
 
Constructor Summary
Marker()
           
 
Method Summary
 void clearMark()
          The mark of the object is cleared, thus it is not marked anymore.
 void clearMark(int mark)
          Clears a special mark.
 int getMark()
          Gets the complete mark for the object.
 boolean isMarked()
          Tests, whether any mark is set.
 boolean isMarked(int mark)
          Tests a special mark, whether it is set.
 void setMark(int mark)
          Sets a mark for the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mark

private int mark
The mark variable containing the markers set.

Constructor Detail

Marker

public Marker()
Method Detail

setMark

public void setMark(int mark)
Description copied from interface: Markable
Sets a mark for the object. The mark is disjuncted (bitwise OR operation) to the existing mark.

Specified by:
setMark in interface Markable
Parameters:
mark - The mark to set.

getMark

public int getMark()
Description copied from interface: Markable
Gets the complete mark for the object.

Specified by:
getMark in interface Markable
Returns:
The complete mark.

clearMark

public void clearMark(int mark)
Description copied from interface: Markable
Clears a special mark. Its inversion is conjuncted (bitwise AND operation) to the existing mark.

Specified by:
clearMark in interface Markable
Parameters:
mark - The mark to be deleted.

clearMark

public void clearMark()
Description copied from interface: Markable
The mark of the object is cleared, thus it is not marked anymore. After this, every call to isMarked() and isMarked(int) should return false.

Specified by:
clearMark in interface Markable
See Also:
Markable.isMarked(), Markable.isMarked(int)

isMarked

public boolean isMarked()
Description copied from interface: Markable
Tests, whether any mark is set.

Specified by:
isMarked in interface Markable
Returns:
true iff a mark is set, false otherwise.

isMarked

public boolean isMarked(int mark)
Description copied from interface: Markable
Tests a special mark, whether it is set.

Specified by:
isMarked in interface Markable
Parameters:
mark - The mark to be tested.
Returns:
true iff the mark is set, false otherwise.