/*******************************************************************************
* Copyright (c) 2008, 2017 xored software, Inc. and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* xored software, Inc. - initial API and Implementation (Andrei Sobolev)
*******************************************************************************/
package org.eclipse.dltk.tcl.internal.parser.raw;
public abstract class TclElement {
private int start, end;
public int getEnd() {
return end;
}
public void setEnd(int end) {
this.end = end;
}
public int getStart() {
return start;
}
public void setStart(int start) {
this.start = start;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + end;
result = prime * result + start;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final TclElement other = (TclElement) obj;
if (end != other.end)
return false;
if (start != other.start)
return false;
return true;
}
}