org.electrocodeogram.cpc.core.api.data
Enum IClone.State

java.lang.Object
  extended by java.lang.Enum<IClone.State>
      extended by org.electrocodeogram.cpc.core.api.data.IClone.State
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IClone.State>
Enclosing interface:
IClone

public static enum IClone.State
extends java.lang.Enum<IClone.State>

Specifies the state of a clone.
The state influences the way a clone is handled by some CPC modules.
Additional information may be attached to a state.

See Also:
IClone.getCloneState(), IClone.getCloneStateChangeDate(), IClone.getCloneStateWeight(), IClone.getCloneStateMessage(), IClone.setCloneState(State, double, String)

Enum Constant Summary
CUSTOMISED
          The clone was not modified after the modifications made during its initial creation.
DEFAULT
          The clone was not modified or the modifications were judged not to be of consequence by the CPC Notification module.
IGNORE
          The user requested that this clone should be ignored from now on.
MODIFIED
          The clone was modified and the modification was judged to be noteworthy by the CPC Notification module.
NOTIFY
          A notification of type NOTIFY is pending for this clone.
ORPHAN
          The clone is the only member of its group.
WARN
          A notification of type WARN is pending for this clone.
 
Method Summary
static IClone.State valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static IClone.State[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DEFAULT

public static final IClone.State DEFAULT
The clone was not modified or the modifications were judged not to be of consequence by the CPC Notification module.
Furthermore the same holds for all members of this clone's clone group. Meaning that this clone and all it's clone group members are semantically equal or very nearly so.

Another way of looking at this would be to consider DEFAULT as IN SYNC and all other states (besides IGNORE) as NOT IN SYNC.

The CPC ruler will display these clones in green.
No marker is added for clones of this this state.
This is the initial state for all newly created clone instances.


CUSTOMISED

public static final IClone.State CUSTOMISED
The clone was not modified after the modifications made during its initial creation. Any changes made right after the clone was created are considered parametrisations of the clone and do not represent modifications which need to be propagated to other group members.

The same state applies to all members of this clone's clone group.

No marker is added for clones of this state.


MODIFIED

public static final IClone.State MODIFIED
The clone was modified and the modification was judged to be noteworthy by the CPC Notification module. However, it was not enough to warrant a state of NOTIFY or even WARN.

Another use for this state are clones which had one of their clone group members modified. Once any member of a clone group changes to state MODIFIED, NOTIFY or WARN, all other members of the clone group which are currently in state DEFAULT should be changed into this state.

The CPC ruler will display these clones in blue.
No marker is added for clones of this this state.


NOTIFY

public static final IClone.State NOTIFY
A notification of type NOTIFY is pending for this clone.

The CPC ruler will display these clones in yellow.
An information marker is added for clones of this this state.


WARN

public static final IClone.State WARN
A notification of type WARN is pending for this clone.

The CPC ruler will display these clones in red.
A warning marker is added for clones of this this state.


IGNORE

public static final IClone.State IGNORE
The user requested that this clone should be ignored from now on.
Its position will still be tracked and it will still be shown in clone views but at no point will any notifications or warnings be issued for a clone of this state.

If this clone is member of a clone group, notifications will still be generated for changes within the other members of that group. However, the ignored clone will not be taken into account for the evaluation of modifications in other group members. In effect this is very similar to making the ignored clone leave the group. The only difference is that the clone could be "unignored" later and would rejoin its clone group as a normal group member.

The CPC ruler will display these clones in gray.
No marker is added for clones of this this state.


ORPHAN

public static final IClone.State ORPHAN
The clone is the only member of its group.
Depending on the CPC configuration such clones will be periodically purged or are kept forever (research purposes). It is also up to the CPC configuration whether such "standalone" clones will be displayed to the user or whether they are hidden.

Method Detail

values

public static IClone.State[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IClone.State c : IClone.State.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static IClone.State valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null