org.sonar.api.qualitymodel
Class Characteristic
java.lang.Object
org.sonar.api.qualitymodel.Characteristic
- All Implemented Interfaces:
- Comparable<Characteristic>
public final class Characteristic
- extends Object
- implements Comparable<Characteristic>
- Since:
- 2.3
ROOT_DEPTH
public static final int ROOT_DEPTH
- See Also:
- Constant Field Values
getId
public Integer getId()
getKey
public String getKey()
setKey
public Characteristic setKey(String s)
getName
public String getName()
setName
public Characteristic setName(String s)
setName
public Characteristic setName(String s,
boolean asKey)
getModel
public Model getModel()
getRule
public Rule getRule()
hasRule
public boolean hasRule()
setRule
public Characteristic setRule(Rule r)
getEnabled
public Boolean getEnabled()
setEnabled
public Characteristic setEnabled(Boolean b)
addChildren
public Characteristic addChildren(Characteristic... list)
addChild
public Characteristic addChild(Characteristic child)
getParents
public List<Characteristic> getParents()
getParent
public Characteristic getParent(String name)
getChildren
public List<Characteristic> getChildren()
- Enabled children sorted by insertion order
getChildren
public List<Characteristic> getChildren(boolean onlyEnabled)
- Enabled children sorted by insertion order
getChild
public Characteristic getChild(String name)
getDepth
public int getDepth()
isRoot
public boolean isRoot()
getOrder
public int getOrder()
getDescription
public String getDescription()
setDescription
public Characteristic setDescription(String s)
setProperty
public CharacteristicProperty setProperty(String key,
String value)
setProperty
public CharacteristicProperty setProperty(String key,
Double value)
addProperty
public CharacteristicProperty addProperty(CharacteristicProperty property)
getProperty
public CharacteristicProperty getProperty(String key)
getPropertyTextValue
public String getPropertyTextValue(String key,
String defaultValue)
getPropertyValue
public Double getPropertyValue(String key,
Double defaultValue)
getProperties
public List<CharacteristicProperty> getProperties()
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(Characteristic o)
- Specified by:
compareTo
in interface Comparable<Characteristic>
create
public static Characteristic create()
createByName
public static Characteristic createByName(String name)
createByKey
public static Characteristic createByKey(String key,
String name)
createByRule
public static Characteristic createByRule(Rule rule)
Copyright © 2009-2012 SonarSource. All Rights Reserved.