1 17 package com.sun.syndication.feed.synd; 18 19 import com.sun.syndication.feed.impl.ObjectBean; 20 import com.sun.syndication.feed.impl.CopyFromHelper; 21 22 import java.util.Collections ; 23 import java.util.HashMap ; 24 import java.util.Map ; 25 import java.io.Serializable ; 26 27 33 public class SyndContentImpl implements Serializable ,SyndContent { 34 private ObjectBean _objBean; 35 private String _type; 36 private String _value; 37 38 39 44 public SyndContentImpl() { 45 _objBean = new ObjectBean(SyndContent.class,this); 46 } 47 48 55 public Object clone() throws CloneNotSupportedException { 56 return _objBean.clone(); 57 } 58 59 66 public boolean equals(Object other) { 67 return _objBean.equals(other); 68 } 69 70 78 public int hashCode() { 79 return _objBean.hashCode(); 80 } 81 82 88 public String toString() { 89 return _objBean.toString(); 90 } 91 92 100 public String getType() { 101 return _type; 102 } 103 104 112 public void setType(String type) { 113 _type = type; 114 } 115 116 122 public String getValue() { 123 return _value; 124 } 125 126 132 public void setValue(String value) { 133 _value = value; 134 } 135 136 137 public Class getInterface() { 138 return SyndContent.class; 139 } 140 141 public void copyFrom(Object obj) { 142 COPY_FROM_HELPER.copy(this,obj); 143 } 144 145 private static final CopyFromHelper COPY_FROM_HELPER; 146 147 static { 148 Map basePropInterfaceMap = new HashMap (); 149 basePropInterfaceMap.put("type",String .class); 150 basePropInterfaceMap.put("value",String .class); 151 152 Map basePropClassImplMap = Collections.EMPTY_MAP; 153 154 COPY_FROM_HELPER = new CopyFromHelper(SyndContent.class,basePropInterfaceMap,basePropClassImplMap); 155 } 156 157 } 158 | Popular Tags |