1 22 package org.jboss.util.property; 23 24 import java.util.EventObject ; 25 26 import org.jboss.util.NullArgumentException; 27 28 34 public class PropertyEvent 35 extends EventObject 36 { 37 38 protected final String name; 39 40 41 protected final String value; 42 43 52 public PropertyEvent(final Object source, 53 final String name, 54 final String value) 55 { 56 super(source); 57 58 if (name == null) 59 throw new NullArgumentException("name"); 60 62 this.name = name; 63 this.value = value; 64 } 65 66 74 public PropertyEvent(Object source, String name) { 75 this(source, name, null); 76 } 77 78 83 public final String getPropertyName() { 84 return name; 85 } 86 87 92 public final String getPropertyValue() { 93 return value; 94 } 95 96 101 public String toString() { 102 return super.toString() + 103 "{ name=" + name + 104 ", value=" + value + 105 " }"; 106 } 107 } 108 | Popular Tags |