org.sonar.api.qualitymodel
Class Characteristic

java.lang.Object
  extended by org.sonar.api.qualitymodel.Characteristic
All Implemented Interfaces:
Comparable<Characteristic>

public final class Characteristic
extends Object
implements Comparable<Characteristic>

Since:
2.3

Field Summary
static int ROOT_DEPTH
           
 
Method Summary
 Characteristic addChild(Characteristic child)
           
 Characteristic addChildren(Characteristic... list)
           
 CharacteristicProperty addProperty(CharacteristicProperty property)
           
 int compareTo(Characteristic o)
           
static Characteristic create()
           
static Characteristic createByKey(String key, String name)
           
static Characteristic createByName(String name)
           
static Characteristic createByRule(Rule rule)
           
 boolean equals(Object o)
           
 Characteristic getChild(String name)
           
 List<Characteristic> getChildren()
          Enabled children sorted by insertion order
 List<Characteristic> getChildren(boolean onlyEnabled)
          Enabled children sorted by insertion order
 int getDepth()
           
 String getDescription()
           
 Boolean getEnabled()
           
 Integer getId()
           
 String getKey()
           
 Model getModel()
           
 String getName()
           
 int getOrder()
           
 Characteristic getParent(String name)
           
 List<Characteristic> getParents()
           
 List<CharacteristicProperty> getProperties()
           
 CharacteristicProperty getProperty(String key)
           
 String getPropertyTextValue(String key, String defaultValue)
           
 Double getPropertyValue(String key, Double defaultValue)
           
 Rule getRule()
           
 int hashCode()
           
 boolean hasRule()
           
 boolean isRoot()
           
 Characteristic setDescription(String s)
           
 Characteristic setEnabled(Boolean b)
           
 Characteristic setKey(String s)
           
 Characteristic setName(String s)
           
 Characteristic setName(String s, boolean asKey)
           
 CharacteristicProperty setProperty(String key, Double value)
           
 CharacteristicProperty setProperty(String key, String value)
           
 Characteristic setRule(Rule r)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ROOT_DEPTH

public static final int ROOT_DEPTH
See Also:
Constant Field Values
Method Detail

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-2011 SonarSource. All Rights Reserved.