org.sonar.api.qualitymodel
Class Model
java.lang.Object
org.sonar.api.qualitymodel.Model
- All Implemented Interfaces:
- Comparable<Model>
public final class Model
- extends Object
- implements Comparable<Model>
- Since:
- 2.3
create
public static Model create()
createByName
public static Model createByName(String s)
createCharacteristicByName
public Characteristic createCharacteristicByName(String name)
createCharacteristicByKey
public Characteristic createCharacteristicByKey(String key,
String name)
createCharacteristicByRule
public Characteristic createCharacteristicByRule(Rule rule)
getId
public Integer getId()
getName
public String getName()
getRootCharacteristics
public List<Characteristic> getRootCharacteristics()
setName
public Model setName(String name)
addCharacteristic
public Characteristic addCharacteristic(Characteristic c)
getCharacteristics
public List<Characteristic> getCharacteristics()
- Returns:
- enabled characteristics
getCharacteristics
public List<Characteristic> getCharacteristics(boolean onlyEnabled)
getCharacteristicByKey
public Characteristic getCharacteristicByKey(String key)
- Search for an ENABLED characteristic by its key.
getCharacteristicByRule
public Characteristic getCharacteristicByRule(Rule rule)
- Search for an ENABLED characteristic with the specified rule.
getCharacteristicsByDepth
public List<Characteristic> getCharacteristicsByDepth(int depth)
- Search for ENABLED characteristics by their depth.
getCharacteristicByName
public Characteristic getCharacteristicByName(String name)
- Search for an ENABLED characteristic by its name.
removeCharacteristic
public Model removeCharacteristic(Characteristic characteristic)
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
compareTo
public int compareTo(Model o)
- Specified by:
compareTo
in interface Comparable<Model>
Copyright © 2009-2011 SonarSource. All Rights Reserved.