1. /*
  2. * Copyright 2002-2004 the original author or authors.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package org.springframework.beans;
  17. /**
  18. * Object containing 0 or more PropertyValues comprising one update.
  19. * @author Rod Johnson
  20. * @since 13 May 2001
  21. * @version $Id: PropertyValues.java,v 1.3 2004/03/18 02:46:12 trisberg Exp $
  22. */
  23. public interface PropertyValues {
  24. /**
  25. * Return an array of the PropertyValue objects held in this object.
  26. * @return an array of the PropertyValue objects held in this object.
  27. */
  28. PropertyValue[] getPropertyValues();
  29. /**
  30. * Return the property value with the given name.
  31. * @param propertyName name to search for
  32. * @return pv or null
  33. */
  34. PropertyValue getPropertyValue(String propertyName);
  35. /**
  36. * Is there a property value for this property?
  37. * @param propertyName name of the property we're interested in
  38. * @return whether there is a property value for this property
  39. */
  40. boolean contains(String propertyName);
  41. /**
  42. * Return the changes since the previous PropertyValues.
  43. * Subclasses should also override equals.
  44. * @param old old property values
  45. * @return PropertyValues updated or new properties.
  46. * Return the empty PropertyValues if there are no changes.
  47. */
  48. PropertyValues changesSince(PropertyValues old);
  49. }