PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 39ms app.codeStats 0ms

/src/org/ubi/Token.java

http://github.com/nddrylliog/ooc
Java | 34 lines | 13 code | 6 blank | 15 comment | 0 complexity | cd27d00f415e3af7818b98ee67fe32db MD5 | raw file
 1package org.ubi;
 2
 3/**
 4 * A token is an interesting part of a text, e.g. a keyword
 5 * 
 6 * @author Amos Wenger
 7 */
 8public class Token {
 9
10	/** the start index of a keyword */
11	public int start;
12	
13	/** the length of a keyword */
14	public int length;
15	
16	/**
17	 * Null constructor, sets start and end to -1
18	 */
19	public Token() {
20		this.start = -1;
21		this.length = -1;
22	}
23	
24	/**
25	 * Default constructor
26	 * @param start
27	 * @param end
28	 */
29	public Token(int start, int end) {
30		this.start = start;
31		this.length = end - start;
32	}
33	
34}