1 20 21 package org.apache.directory.ldapstudio.browser.core.internal.model; 22 23 24 import java.io.Serializable ; 25 import java.util.Set ; 26 27 import org.apache.directory.ldapstudio.browser.core.model.DN; 28 import org.apache.directory.ldapstudio.browser.core.model.IConnection; 29 30 31 public class ChildrenInfo implements Serializable 32 { 33 34 private static final long serialVersionUID = -4642987611142312896L; 35 36 public static int COUNTER = 0; 37 38 protected volatile boolean childrenInitialzed = false; 39 40 protected volatile Set childrenSet = null; 41 42 protected volatile boolean hasMoreChildren = false; 43 44 45 public ChildrenInfo() 46 { 47 COUNTER++; 48 } 49 50 class AliasOrReferral implements Serializable 51 { 52 53 private static final long serialVersionUID = -8339682035388780022L; 54 55 protected IConnection connection; 56 57 protected DN dn; 58 59 60 protected AliasOrReferral() 61 { 62 } 63 64 65 public AliasOrReferral( IConnection connection, DN dn ) 66 { 67 this.connection = connection; 68 this.dn = dn; 69 } 70 71 72 public boolean equals( Object o ) throws ClassCastException 73 { 74 if ( o instanceof AliasOrReferral ) 75 { 76 return this.toString().equals( ( ( AliasOrReferral ) o ).toString() ); 77 } 78 return false; 79 } 80 81 82 public int hashCode() 83 { 84 return this.toString().hashCode(); 85 } 86 87 88 public String toString() 89 { 90 return connection.hashCode() + "_" + dn.toString(); } 92 93 } 94 95 } 96 | Popular Tags |