Package org.sonar.java.se.checks
Enum DivisionByZeroCheck.ZeroConstraint
- java.lang.Object
-
- java.lang.Enum<DivisionByZeroCheck.ZeroConstraint>
-
- org.sonar.java.se.checks.DivisionByZeroCheck.ZeroConstraint
-
- All Implemented Interfaces:
Serializable,Comparable<DivisionByZeroCheck.ZeroConstraint>,Constraint
- Enclosing class:
- DivisionByZeroCheck
public static enum DivisionByZeroCheck.ZeroConstraint extends Enum<DivisionByZeroCheck.ZeroConstraint> implements Constraint
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintcopyOver(RelationalSymbolicValue.Kind kind)Return constraint which should be applied to the rhs of the relation, if this constraint is set on the lhs of the relation.booleanhasPreciseValue()Constraintinverse()booleanisValidWith(Constraint constraint)StringvalueAsString()static DivisionByZeroCheck.ZeroConstraintvalueOf(String name)Returns the enum constant of this type with the specified name.static DivisionByZeroCheck.ZeroConstraint[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ZERO
public static final DivisionByZeroCheck.ZeroConstraint ZERO
-
NON_ZERO
public static final DivisionByZeroCheck.ZeroConstraint NON_ZERO
-
-
Method Detail
-
values
public static DivisionByZeroCheck.ZeroConstraint[] 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 (DivisionByZeroCheck.ZeroConstraint c : DivisionByZeroCheck.ZeroConstraint.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DivisionByZeroCheck.ZeroConstraint valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
hasPreciseValue
public boolean hasPreciseValue()
- Specified by:
hasPreciseValuein interfaceConstraint- Returns:
- true if value represented by this SV is precisely known.
-
valueAsString
public String valueAsString()
- Specified by:
valueAsStringin interfaceConstraint- Returns:
- String representation of value encoded by constraint for purpose of flow message
-
isValidWith
public boolean isValidWith(@Nullable Constraint constraint)
- Specified by:
isValidWithin interfaceConstraint
-
copyOver
@Nullable public Constraint copyOver(RelationalSymbolicValue.Kind kind)
Description copied from interface:ConstraintReturn constraint which should be applied to the rhs of the relation, if this constraint is set on the lhs of the relation.- Specified by:
copyOverin interfaceConstraint- Parameters:
kind- kind of relation over which constraint is copied- Returns:
- constraint to be set on rhs, null if no constraint should be set
-
inverse
public Constraint inverse()
- Specified by:
inversein interfaceConstraint
-
-