Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.goda.chronic.tags;
 
 
 import java.util.List;
 import java.util.Map;
 
public class Pointer extends Tag<Pointer.PointerType> {
    public static final Scanner SCANNER = new Scanner() {
            public List<Tokenscan(List<TokentokensOptions options) {
                return Pointer.scan(tokensoptions);
            }
        };
    private static final String IN_PATTERN = "\\bin\\b";
    private static final String FUTURE_PATTERN = "\\bfuture\\b";
    private static final String PAST_PATTERN = "\\bpast\\b";
    public Pointer(Pointer.PointerType type) {
        super(type);
    }
    public static List<Tokenscan(List<TokentokensOptions options) {
        for (Token token : tokens) {
            Pointer t = Pointer.scanForAll(tokenoptions);
            if (t != null) {
                token.tag(t);
            }
        }
        return tokens;
    }
    public static Pointer scanForAll(Token tokenOptions options) {
        Map<StringPointer.PointerTypescanner = new HashMap<StringPointer.PointerType>();
        scanner.put(...);
        scanner.put(...);
        for (String scannerItem : scanner.keySet()) {
            if (token.getWord()
                         .matches(scannerItem)) {
                return new Pointer(scanner.get(scannerItem));
            }
        }
        return null;
    }
    @Override
    public String toString() {
        return "pointer-" + getType();
    }
    public enum PointerType {FUTURE, NONE, PAST;
    }
New to GrepCode? Check out our FAQ X