public static class ByObjectBasicRelationSupport.DataForBasicRelations<T extends BrooklynObject> extends java.lang.Object implements BrooklynObject.RelationSupport<T>
| Constructor and Description |
|---|
DataForBasicRelations(java.lang.Runnable relationChangeCallback) |
| Modifier and Type | Method and Description |
|---|---|
<U extends BrooklynObject> |
add(RelationshipType<? super T,? super U> relationship,
U target)
Adds a relationship of the given type from this object pointing at the given target,
and ensures that the inverse relationship (if there is one) is present at the target pointing back at this object.
|
<U extends BrooklynObject> |
getRelations(RelationshipType<? super T,U> relationship) |
java.util.Set<RelationshipType<? super T,? extends BrooklynObject>> |
getRelationshipTypes() |
<U extends BrooklynObject> |
remove(RelationshipType<? super T,? super U> relationship,
U target)
Removes any and all relationships of the given type from this object pointing at the given target,
and ensures that the inverse relationships (if there are one) are also removed.
|
public DataForBasicRelations(java.lang.Runnable relationChangeCallback)
public java.util.Set<RelationshipType<? super T,? extends BrooklynObject>> getRelationshipTypes()
getRelationshipTypes in interface BrooklynObject.RelationSupport<T extends BrooklynObject>RelationshipTypes originating from this objectpublic <U extends BrooklynObject> java.util.Set<U> getRelations(RelationshipType<? super T,U> relationship)
getRelations in interface BrooklynObject.RelationSupport<T extends BrooklynObject>BrooklynObjects which are targets of the given RelationshipTypepublic <U extends BrooklynObject> void add(RelationshipType<? super T,? super U> relationship, U target)
BrooklynObject.RelationSupportadd in interface BrooklynObject.RelationSupport<T extends BrooklynObject>public <U extends BrooklynObject> void remove(RelationshipType<? super T,? super U> relationship, U target)
BrooklynObject.RelationSupportremove in interface BrooklynObject.RelationSupport<T extends BrooklynObject>