001
014
015 package com.liferay.portal.xml;
016
017 import com.liferay.portal.kernel.xml.Text;
018 import com.liferay.portal.kernel.xml.Visitor;
019
020
023 public class TextImpl extends NodeImpl implements Text {
024
025 public TextImpl(org.dom4j.Text text) {
026 super(text);
027
028 _text = text;
029 }
030
031 @Override
032 public <T, V extends Visitor<T>> T accept(V visitor) {
033 return visitor.visitText(this);
034 }
035
036 @Override
037 public boolean equals(Object obj) {
038 if (this == obj) {
039 return true;
040 }
041
042 if (!(obj instanceof TextImpl)) {
043 return false;
044 }
045
046 org.dom4j.Text text = ((TextImpl)obj).getWrappedText();
047
048 return _text.equals(text);
049 }
050
051 public org.dom4j.Text getWrappedText() {
052 return _text;
053 }
054
055 @Override
056 public int hashCode() {
057 return _text.hashCode();
058 }
059
060 @Override
061 public String toString() {
062 return _text.toString();
063 }
064
065 private org.dom4j.Text _text;
066
067 }