Esempio n. 1
0
 public synchronized void add(final Marker reference) {
   if (reference == null) {
     throw new IllegalArgumentException("A null value cannot be added to a Marker as reference.");
   }
   if (this.contains(reference)) {
     return;
   }
   if (reference.contains(this)) {
     return;
   }
   if (this.refereceList == null) {
     this.refereceList = new Vector();
   }
   this.refereceList.add(reference);
 }
Esempio n. 2
0
 public boolean contains(final String name) {
   if (name == null) {
     throw new IllegalArgumentException("Other cannot be null");
   }
   if (this.name.equals(name)) {
     return true;
   }
   if (this.hasReferences()) {
     for (int i = 0; i < this.refereceList.size(); ++i) {
       final Marker ref = this.refereceList.get(i);
       if (ref.contains(name)) {
         return true;
       }
     }
   }
   return false;
 }