1 50 51 package org.apache.avalon.meta.info; 52 53 import java.util.Properties ; 54 55 73 public class CategoryDescriptor 74 extends Descriptor 75 { 76 public static final String SEPERATOR = "."; 77 78 private final String m_name; 79 80 88 public CategoryDescriptor( final String name, 89 final Properties attributes ) 90 throws NullPointerException 91 { 92 super( attributes ); 93 if( null == name ) 94 { 95 throw new NullPointerException ( "name" ); 96 } 97 98 m_name = name; 99 } 100 101 106 public String getName() 107 { 108 return m_name; 109 } 110 111 115 public boolean equals( Object other ) 116 { 117 boolean isEqual = other instanceof CategoryDescriptor; 118 if ( isEqual ) 119 { 120 isEqual = isEqual && m_name.equals( ((CategoryDescriptor)other).m_name ); 121 } 122 return isEqual; 123 } 124 125 129 public int hashCode() 130 { 131 int hash = super.hashCode(); 132 hash >>>= 13; 133 hash ^= m_name.hashCode(); 134 return hash; 135 } 136 } 137 | Popular Tags |