DateValue.java 1.17 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.xfa.content;

import com.adobe.xfa.Element;
import com.adobe.xfa.Node;
import com.adobe.xfa.ScriptTable;
import com.adobe.xfa.XFA;
import com.adobe.xfa.content.Content;
import com.adobe.xfa.content.DateScript;
import org.xml.sax.Attributes;

public final class DateValue
extends Content {
    public DateValue(Element parent, Node prevSibling) {
        super(parent, prevSibling, null, "date", "date", null, XFA.DATETAG, "date");
    }

    @Override
    public boolean equals(Object object) {
        if (this == object) {
            return true;
        }
        return super.equals(object) && this.getValue().equals(((DateValue)object).getValue());
    }

    @Override
    public int hashCode() {
        return super.hashCode() ^ this.getValue().hashCode();
    }

    public String getValue() {
        return super.getStrValue();
    }

    @Override
    public ScriptTable getScriptTable() {
        return DateScript.getScriptTable();
    }

    public void setValue(String dateValue) {
        this.setStrValue(dateValue, true, false);
    }

    @Override
    public String toString() {
        return this.getValue();
    }
}