1 11 package org.eclipse.jdt.internal.core; 12 13 import org.eclipse.jdt.core.IClasspathAttribute; 14 import org.eclipse.jdt.internal.core.util.Util; 15 16 public class ClasspathAttribute implements IClasspathAttribute { 17 18 private String name; 19 private String value; 20 21 public ClasspathAttribute(String name, String value) { 22 this.name = name; 23 this.value = value; 24 } 25 26 public boolean equals(Object obj) { 27 if (!(obj instanceof ClasspathAttribute)) return false; 28 ClasspathAttribute other = (ClasspathAttribute) obj; 29 return this.name.equals(other.name) && this.value.equals(other.value); 30 } 31 32 public String getName() { 33 return this.name; 34 } 35 36 public String getValue() { 37 return this.value; 38 } 39 40 public int hashCode() { 41 return Util.combineHashCodes(this.name.hashCode(), this.value.hashCode()); 42 } 43 44 public String toString() { 45 return this.name + "=" + this.value; } 47 48 } 49 | Popular Tags |