1 17 package com.sun.syndication.feed.impl; 18 19 import com.sun.syndication.feed.impl.CloneableBean; 20 import com.sun.syndication.feed.impl.EqualsBean; 21 22 import java.io.Serializable ; 23 import java.util.Set ; 24 25 44 public class ObjectBean implements Serializable , Cloneable { 45 private EqualsBean _equalsBean; 46 private ToStringBean _toStringBean; 47 private CloneableBean _cloneableBean; 48 49 55 public ObjectBean(Class beanClass,Object obj) { 56 this(beanClass,obj,null); 57 } 58 59 73 public ObjectBean(Class beanClass,Object obj,Set ignoreProperties) { 74 _equalsBean = new EqualsBean(beanClass,obj); 75 _toStringBean = new ToStringBean(beanClass,obj); 76 _cloneableBean = new CloneableBean(obj,ignoreProperties); 77 } 78 79 86 public Object clone() throws CloneNotSupportedException { 87 return _cloneableBean.beanClone(); 88 } 89 90 97 public boolean equals(Object other) { 98 return _equalsBean.beanEquals(other); 99 } 100 101 109 public int hashCode() { 110 return _equalsBean.beanHashCode(); 111 } 112 113 119 public String toString() { 120 return _toStringBean.toString(); 121 } 122 123 } 124 125 | Popular Tags |