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