1 8 package org.apache.avalon.phoenix.metainfo; 9 10 import org.apache.avalon.framework.Version; 11 12 19 public final class ServiceDescriptor 20 { 21 private final Version m_version; 22 23 private final String m_name; 24 25 31 public ServiceDescriptor( final String name, final Version version ) 32 { 33 m_name = name; 34 m_version = version; 35 } 36 37 42 public Version getVersion() 43 { 44 return m_version; 45 } 46 47 53 public String getName() 54 { 55 return m_name; 56 } 57 58 65 public boolean matches( final ServiceDescriptor other ) 66 { 67 return 68 other.getName().equals( m_name ) 69 && other.getVersion().complies( m_version ); 70 } 71 72 77 public String toString() 78 { 79 return m_name + "/" + m_version; 80 } 81 } 82 | Popular Tags |