1 2 24 package org.enhydra.tool.archive; 25 26 import org.enhydra.tool.common.PathHandle; 28 29 public class Module { 31 private String name = null; 32 private String archive = null; 33 34 public Module(String filepath) { 35 PathHandle ph = PathHandle.createPathHandle(filepath); 36 37 setName(ph.getFile().getName()); 38 setArchive(ph.getPath()); 39 } 40 41 public String getArchive() { 42 return archive; 43 } 44 45 public void setArchive(String a) { 46 archive = a; 47 } 48 49 public String getName() { 50 return name; 51 } 52 53 public boolean equals(Object obj) { 55 boolean equal = false; 56 57 if (obj instanceof Module) { 58 Module mod = (Module) obj; 59 60 if (mod.getName().equals(getName())) { 61 equal = true; 62 } 63 if (equal) { 64 if (!mod.getArchive().equals(getArchive())) { 65 equal = false; 66 } 67 } 68 } 69 return equal; 70 } 71 72 private void setName(String n) { 73 name = n; 74 } 75 76 } 77 | Popular Tags |