1 18 package org.apache.beehive.netui.compiler.xdoclet.typesystem.impl; 19 20 public class DelegatingImpl 21 { 22 private Object _delegate; 23 24 protected DelegatingImpl( Object delegate ) 25 { 26 assert delegate != null; 27 _delegate = delegate; 28 } 29 30 public boolean equals( Object o ) 31 { 32 if ( o == null ) return false; 33 if ( o == this ) return true; 34 if ( ! ( o instanceof DelegatingImpl ) ) return false; 35 return _delegate.equals( ( ( DelegatingImpl ) o )._delegate ); 36 } 37 38 public int hashCode() 39 { 40 return _delegate.hashCode(); 41 } 42 43 public String toString() 44 { 45 return _delegate.toString(); 46 } 47 48 protected Object getDelegate() 49 { 50 return _delegate; 51 } 52 53 protected void setDelegate( Object delegate ) 54 { 55 _delegate = delegate; 56 } 57 } 58 | Popular Tags |