Class Violation
java.lang.Object
com.dna.jopt.member.unit.violation.Violation
- All Implemented Interfaces:
IViolation
,Serializable
,Cloneable
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Gets the attribute.Gets the category.int
getCode()
Gets the code that is identifying this IViolationGets thesubAttribute
.getValue()
Deprecated.Gets the routes, which are triggering the violation.Gets theviolationActors
.Gets the violation description.Gets theviolationValue
, the default value is""
.void
Sets the value.void
setViolationActorRoutes
(List<ILogicEntityRoute> routes) Sets the routes, which are triggering the violation.void
setViolationActors
(List<IOptimizationElement> elements) Gets theviolationActors
.toString()
Returns thecategory
, theattribute
, thevalue
and theviolationValue
.
-
Constructor Details
-
Violation
-
-
Method Details
-
setViolationActors
Description copied from interface:IViolation
Gets theviolationActors
.- Specified by:
setViolationActors
in interfaceIViolation
- Parameters:
elements
- the arrayList containing IOptimizationElements
-
getViolationActors
Description copied from interface:IViolation
Gets theviolationActors
.- Specified by:
getViolationActors
in interfaceIViolation
- Returns:
- the arraylist violationActors containing IOptimizationElements
-
setViolationActorRoutes
Description copied from interface:IViolation
Sets the routes, which are triggering the violation.- Specified by:
setViolationActorRoutes
in interfaceIViolation
- Parameters:
routes
- the new violation actor routes
-
getViolationActorRoutes
Description copied from interface:IViolation
Gets the routes, which are triggering the violation. This method may return an empty list even though violations are present- Specified by:
getViolationActorRoutes
in interfaceIViolation
- Returns:
- the violation actor routes
-
getCategory
Description copied from interface:IViolation
Gets the category.- Specified by:
getCategory
in interfaceIViolation
- Returns:
- the category
-
getAttribute
Description copied from interface:IViolation
Gets the attribute.- Specified by:
getAttribute
in interfaceIViolation
- Returns:
- the attribute
-
getSubAttribute
Description copied from interface:IViolation
Gets thesubAttribute
.- Specified by:
getSubAttribute
in interfaceIViolation
- Returns:
- the subAttribute
-
setValue
Description copied from interface:IViolation
Sets the value.- Specified by:
setValue
in interfaceIViolation
- Parameters:
violationDesc
- the value descviolationValue
- the violation value
-
getValue
Deprecated.- Specified by:
getValue
in interfaceIViolation
- Returns:
- the value
-
getViolationDescription
Description copied from interface:IViolation
Gets the violation description.- Specified by:
getViolationDescription
in interfaceIViolation
- Returns:
- the violation description
-
getCode
public int getCode()Description copied from interface:IViolation
Gets the code that is identifying this IViolation- Specified by:
getCode
in interfaceIViolation
- Returns:
- the code
-
toString
Description copied from interface:IViolation
Returns thecategory
, theattribute
, thevalue
and theviolationValue
. IfgetViolationActors()
is notempty
adds all theids
of all current actors.- Specified by:
toString
in interfaceIViolation
- Overrides:
toString
in classObject
- Returns:
- category, attribute, value and id of all actors
-
copy
Description copied from interface:IViolation
- Specified by:
copy
in interfaceIViolation
- Returns:
- a copy of the Violation with the category, attribute, value and code
-
getViolationValue
Description copied from interface:IViolation
Gets theviolationValue
, the default value is""
.- Specified by:
getViolationValue
in interfaceIViolation
- Returns:
- the violationvalue
-