Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.goda.chronic.tags;
 
 
 import java.util.List;
 
 
 public class ScalarDay extends Scalar {
    public static final Scanner SCANNER = new Scanner() {
            public List<Tokenscan(List<TokentokensOptions options) {
                return ScalarDay.scan(tokensoptions);
            }
        };
    private static final String DAY_PATTERN = "^\\d\\d?$";
    public ScalarDay(Double type) {
        super(type);
    }
    public static ScalarDay scan(Token tokenToken postTokenOptions options) {
        if (token.getWord()
                     .matches()) {
            int scalarValue = Integer.parseInt(token.getWord());
            if (!((scalarValue > 31) || ((postToken != null) && ..contains(postToken.getWord())))) {
                return new ScalarDay(Double.valueOf(scalarValue));
            }
        }
        return null;
    }
    @Override
    public String toString() {
        return super.toString() + "-day-" + getType();
    }
New to GrepCode? Check out our FAQ X