Class GenericElement
- java.lang.Object
-
- org.opennms.netmgt.graph.api.generic.GenericElement
-
- Direct Known Subclasses:
GenericEdge
,GenericGraph
,GenericVertex
public abstract class GenericElement extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GenericElement.GenericElementBuilder<T extends GenericElement.GenericElementBuilder>
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Object>
properties
-
Constructor Summary
Constructors Modifier Constructor Description protected
GenericElement(java.util.Map<java.lang.String,java.lang.Object> properties)
All values of properties need to be immutable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getId()
java.lang.String
getLabel()
java.lang.String
getNamespace()
java.util.Map<java.lang.String,java.lang.Object>
getProperties()
<T> T
getProperty(java.lang.String key)
<T> T
getProperty(java.lang.String key, T defaultValue)
int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getProperty
public <T> T getProperty(java.lang.String key)
-
getProperty
public <T> T getProperty(java.lang.String key, T defaultValue)
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
-
getNamespace
public java.lang.String getNamespace()
-
getLabel
public java.lang.String getLabel()
-
getId
public java.lang.String getId()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-