src/main/java/org/jboss/util/property/PropertyMap.java
/**
    * Add a bound property listener.
    *
    * @param listener   Bound property listener to add.
    */
Add a bound property listener.
@param listener   Bound property listener to add.
Add a bound property listener . @param listener Bound property listener to add .
protected void addPropertyListener(BoundPropertyListener listener)
   {
      String name = listener.getPropertyName();
      List list = (List) boundListeners.get(name);
      if (list == null)
      {
         list = Collections.synchronizedList(new ArrayList());
         boundListeners.put(name, list);
      }
      if (!list.contains(listener))
      {
         list.add(listener);
         listener.propertyBound(this);
      }
   }
protected void addPropertyListener ( BoundPropertyListener listener ) { String name = listener . getPropertyName ( ) ; List list = ( List ) boundListeners . get ( name ) ; if ( list == null ) { list = Collections . synchronizedList ( new ArrayList ( ) ) ; boundListeners . put ( name , list ) ; } if ( ! list . contains ( listener ) ) { list . add ( listener ) ; listener . propertyBound ( this ) ; } }
Add a bound property listener.
Add a bound property listener .
// get the bound property name // get the bound listener list for the property // if list is null, then add a new list // if listener is not in the list already, then add it // notify listener that is is bound