org.argouml.cognitive
Class ResolvedCritic
java.lang.Object
|
+--org.argouml.cognitive.ResolvedCritic
- public class ResolvedCritic
- extends java.lang.Object
This class is responsible for identifying one critic that has been resolved
by the user in one specific context.
Field Summary |
protected static org.apache.log4j.Category |
cat
|
Constructor Summary |
ResolvedCritic(Critic c,
org.tigris.gef.util.VectorSet offs)
Same as ResolvedCritic(c, offs, true) . |
ResolvedCritic(Critic c,
org.tigris.gef.util.VectorSet offs,
boolean canCreate)
Creates a new ResolvedCritic from the given information. |
ResolvedCritic(java.lang.String critic,
java.util.Vector offenders)
Creates a new ResolvedCritic using the name of the Critic and the
Vector of objects that triggered the Critic given as parameters. |
Method Summary |
boolean |
equals(java.lang.Object obj)
equals returns true if and only if obj also is a ResolvedCritic,
has the same critic name, and has all related objects that this
object has. |
java.lang.String |
getCritic()
Gets the content of _critic. |
protected java.lang.String |
getCriticString(Critic c)
Obtains a String that identifies the type of Critic. |
java.util.Vector |
getOffenderList()
Gets the list of related objects, _offenders. |
protected void |
importOffenders(org.tigris.gef.util.VectorSet set,
boolean canCreate)
Imports the set of related objects in set to this object. |
java.lang.String |
toString()
{@inheritDoc} |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
cat
protected static org.apache.log4j.Category cat
ResolvedCritic
public ResolvedCritic(java.lang.String critic,
java.util.Vector offenders)
- Creates a new ResolvedCritic using the name of the Critic and the
Vector of objects that triggered the Critic given as parameters.
- Parameters:
critic
- The name of the Critic that has been resolvedoffenders
- The Vector of related objects.
ResolvedCritic
public ResolvedCritic(Critic c,
org.tigris.gef.util.VectorSet offs)
throws UnresolvableException
- Same as
ResolvedCritic(c, offs, true)
.
- Throws:
UnresolvableException
- If some of the objects does
not have a ItemUID and does not accept a new
one.
ResolvedCritic
public ResolvedCritic(Critic c,
org.tigris.gef.util.VectorSet offs,
boolean canCreate)
throws UnresolvableException
- Creates a new ResolvedCritic from the given information.
- Parameters:
c
- The Critic that has been resolved.offs
- The set of objects that triggered the Critic.canCreate
- If it should try to assign new
ItemUIDs to objects that doesn't have.- Throws:
UnresolvableException
- If some of the objects does
not have a ItemUID and does not accept a new
one.
equals
public boolean equals(java.lang.Object obj)
- equals returns true if and only if obj also is a ResolvedCritic,
has the same critic name, and has all related objects that this
object has. Note that it is not required that this object has all
related objects that that object has.
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
- Object to compare to.- Returns:
- True if equal according to the description, false
otherwise.
getCriticString
protected java.lang.String getCriticString(Critic c)
throws UnresolvableException
- Obtains a String that identifies the type of Critic.
- Parameters:
c
- A Critic.- Throws:
UnreslovableException
- Not implemented.
importOffenders
protected void importOffenders(org.tigris.gef.util.VectorSet set,
boolean canCreate)
throws UnresolvableException
- Imports the set of related objects in set to this object. If an
object does not have an ItemUID, canCreate determines if one will
be provided. If some object does not have an ItemUID and canCreate
is false och the object does not accept and ItemUID, then
UnresolvableException is thrown.
- Parameters:
set
- The set of related objects to import.canCreate
- If ItemUIDs are allowed to be created.- Throws:
UnresolvableException
- if not all objects can be
imported.
getCritic
public java.lang.String getCritic()
- Gets the content of _critic.
getOffenderList
public java.util.Vector getOffenderList()
- Gets the list of related objects, _offenders.
toString
public java.lang.String toString()
- {@inheritDoc}
- Overrides:
toString
in class java.lang.Object