1 23 24 package org.objectweb.fractal.adl.components; 25 26 public class ComponentPair { 27 28 public final ComponentContainer container; 29 30 public final Component comp; 31 32 public ComponentPair ( 33 final ComponentContainer container, 34 final Component comp) 35 { 36 this.container = container; 37 this.comp = comp; 38 } 39 40 public int hashCode () { 41 return container.hashCode() + comp.hashCode(); 42 } 43 44 public boolean equals (final Object o) { 45 if (o instanceof ComponentPair) { 46 ComponentPair other = (ComponentPair)o; 47 return other.container == container && other.comp == comp; 48 } 49 return false; 50 } 51 } 52 | Popular Tags |