예제 #1
0
 /**
  * implement Comparable<LibraryDependency> so that the L2pClassLoader may keep a (sorted) TreeMap
  * of all registered Libraries
  *
  * @return comparison code
  */
 @Override
 public int compareTo(LibraryIdentifier other) {
   if (this.getName().equals(other.getName()))
     return this.getVersion().compareTo(other.getVersion());
   else return this.getName().compareTo(other.getName());
 }
예제 #2
0
 /**
  * compares this identifier to another one
  *
  * @param i
  * @return true, if the given identifier is the same as this
  */
 public boolean equals(LibraryIdentifier i) {
   return this.toString().equals(i.toString());
 }
예제 #3
0
 @Override
 public Void visitLibraryIdentifier(LibraryIdentifier node) {
   writer.print(node.getName());
   return null;
 }