public String getImplementedInterface(DataObject message) { return message.getImplementedInterface().getName(); }
@SuppressWarnings("unchecked") public static <T extends DataObject> Map<InstanceIdentifier<T>, T> collectTypeFromMap(Class<T> tClass, Map<InstanceIdentifier<?>, DataObject> map) { Map<InstanceIdentifier<T>, T> result = Maps.newHashMap(); for (Map.Entry<InstanceIdentifier<?>, DataObject> entry : map.entrySet()) { if (tClass.isAssignableFrom(entry.getValue().getImplementedInterface())) { final InstanceIdentifier<T> tIID = (InstanceIdentifier<T>) entry.getKey(); final T tObj = (T) entry.getValue(); result.put(tIID, tObj); } } return result; }
/** * Find data hierarchy parent from concrete Data class * * This method is shorthand which gets DataObject class by invoking * {@link DataObject#getImplementedInterface()} and uses * {@link #findHierarchicalParent(Class)}. * * @param child * Child object for which the parent needs to be located. * @return Parent class, or null if a parent is not found. */ public static Class<?> findHierarchicalParent(final DataObject child) { if (child instanceof ChildOf) { return ClassLoaderUtils.findFirstGenericArgument(child.getImplementedInterface(), ChildOf.class); } return null; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!AggregatedTopology.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } AggregatedTopology other = (AggregatedTopology)obj; if (!Objects.equals(_originalTopology, other.getOriginalTopology())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!RpcLeafOnlyUsesAugment.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } RpcLeafOnlyUsesAugment other = (RpcLeafOnlyUsesAugment)obj; if (!Objects.equals(_leafFromGrouping, other.getLeafFromGrouping())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!NestedListSimpleAugment.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } NestedListSimpleAugment other = (NestedListSimpleAugment)obj; if (!Objects.equals(_type, other.getType())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!RpcSecondLeafOnlyAugment.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } RpcSecondLeafOnlyAugment other = (RpcSecondLeafOnlyAugment)obj; if (!Objects.equals(_secondSimpleValue, other.getSecondSimpleValue())) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.overlay.rev150105.SupportedTunnelsParameters.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.overlay.rev150105.SupportedTunnelsParameters other = (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.overlay.rev150105.SupportedTunnelsParameters)obj; if (!Objects.equals(_ipPortLocatorEntry, other.getIpPortLocatorEntry())) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowHashIdMapping.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowHashIdMapping other = (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowHashIdMapping)obj; if (!Objects.equals(_flowHashIdMap, other.getFlowHashIdMap())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!TreeLeafOnlyUsesAugment.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } TreeLeafOnlyUsesAugment other = (TreeLeafOnlyUsesAugment)obj; if (!Objects.equals(_leafFromGrouping, other.getLeafFromGrouping())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!IdentifiableNode.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } IdentifiableNode other = (IdentifiableNode)obj; if (!Objects.equals(_nodeIdentifier, other.getNodeIdentifier())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!InventoryNode.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } InventoryNode other = (InventoryNode)obj; if (!Objects.equals(_inventoryNodeRef, other.getInventoryNodeRef())) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.RpcLeafOnlyUsesAugment.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.RpcLeafOnlyUsesAugment other = (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.RpcLeafOnlyUsesAugment)obj; if (!Objects.equals(_leafFromGrouping, other.getLeafFromGrouping())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!RpcLeafOnlyAugment.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } RpcLeafOnlyAugment other = (RpcLeafOnlyAugment)obj; if (!Objects.equals(_simpleValue, other.getSimpleValue())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!TreeLeafOnlyAugment.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } TreeLeafOnlyAugment other = (TreeLeafOnlyAugment)obj; if (!Objects.equals(_simpleValue, other.getSimpleValue())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!InventoryNodeConnector.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } InventoryNodeConnector other = (InventoryNodeConnector)obj; if (!Objects.equals(_inventoryNodeConnectorRef, other.getInventoryNodeConnectorRef())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!AggregatedNode.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } AggregatedNode other = (AggregatedNode)obj; if (!Objects.equals(_originalNode, other.getOriginalNode())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!TreeSecondLeafOnlyAugment.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } TreeSecondLeafOnlyAugment other = (TreeSecondLeafOnlyAugment)obj; if (!Objects.equals(_secondSimpleValue, other.getSecondSimpleValue())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!TopologyTypes1.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } TopologyTypes1 other = (TopologyTypes1)obj; if (!Objects.equals(_topologyEventSource, other.getTopologyEventSource())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!Node1.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } Node1 other = (Node1)obj; if (!Objects.equals(_eventSourceNode, other.getEventSourceNode())) { return false; } return true; }