OSDN Git Service

Version 0.11
[bm-asn1/bm-asn1.git] / jp / bitmeister / asn1 / type / TimeType.java
index 1010c86..af965a7 100644 (file)
@@ -19,7 +19,6 @@ import java.nio.charset.Charset;
 import java.text.DateFormat;
 import java.util.Calendar;
 import java.util.Date;
-import java.util.regex.Pattern;
 
 import jp.bitmeister.asn1.processor.ASN1Visitor;
 
@@ -36,8 +35,6 @@ import jp.bitmeister.asn1.processor.ASN1Visitor;
  */
 public abstract class TimeType extends StringType {
 
-       private static final Pattern pattern = Pattern.compile("[0-9\\.Z\\+\\-]*");
-
        /**
         * Converts the {@code Date} object to a formatted {@code String} that
         * represents date and time, and set it to this instance.
@@ -89,25 +86,15 @@ public abstract class TimeType extends StringType {
        /*
         * (non-Javadoc)
         * 
-        * @see jp.bitmeister.asn1.type.StringType#pattern()
-        */
-       @Override
-       protected Pattern pattern() {
-               return pattern;
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
         * @see
         * jp.bitmeister.asn1.type.StringType#accept(jp.bitmeister.asn1.processor
         * .ASN1Visitor)
         */
        @Override
-       public <E extends Throwable> void accept(ASN1Visitor<E> visitor) throws E {
-               visitor.visit(this);
+       public <R, E extends Throwable> R accept(ASN1Visitor<R, E> visitor) throws E {
+               return visitor.visit(this);
        }
-
+       
        /**
         * Parses and converts the strings represents a set of date, time and time
         * defferential to a {@code Date}.