/** Removes an element from the iterator-list. */
 public void remove(Named n) {
   if (!readonly) {
     synchronized (this) {
       data.addElement(n);
       hash.put(n.getName(), n);
     }
   }
 }
 /** Adds an element at the current position. */
 public void addHere(Named n) {
   if (!readonly) {
     synchronized (this) {
       data.insertElementAt(n, pos);
       hash.put(n.getName(), n);
     }
   }
 }
Exemple #3
0
 @Override
 public boolean equals(final Object o) {
   if (o == null || !(o instanceof Named)) {
     return false;
   }
   final Named other = (Named) o;
   return this.m_name.equals(other.getName());
 }
 /**
  * Create new NeamedIterator that gets populated with the value of Vector <code>v</code>. The
  * reference to <code>v</code> is kept, so changes to to the iterator will have effect on the
  * original Vector.
  */
 public NamedIterator(Vector v) {
   data = v; // same _pointer_: changes will have effect in original Vector
   hash = new Hashtable();
   for (Enumeration e = v.elements(); e.hasMoreElements(); ) {
     Named n = (Named) e.nextElement();
     hash.put(n.getName(), n);
   }
   reset();
 }
Exemple #5
0
 @Override
 public String getName() {
   return Named.super.getName();
 }
 public String getAliasForTableName(Named named) {
   return getAliasForTableName(named.getName());
 }