public int compareTo(Tuple other){
	switch(types[this.compIndex]){
		case LONG:{
				  Long thisValue = (Long)this.properties[this.compIndex];
				  Long otherValue = (Long)other.properties[this.compIndex];
				  return thisValue.compareTo(otherValue);
			  }
		case INT:{
				 Integer thisValue = (Integer)this.properties[this.compIndex];
				 Integer otherValue = (Integer)other.properties[this.compIndex];
				 return thisValue.compareTo(otherValue);
			 }
		case SHORT:{
				   Short thisValue = (Short)this.properties[this.compIndex];
				   Short otherValue = (Short)other.properties[this.compIndex];
				   return thisValue.compareTo(otherValue);
			   }
		case BYTE:{
				  Byte thisValue = (Byte)this.properties[this.compIndex];
				  Byte otherValue = (Byte)other.properties[this.compIndex];
				  return thisValue.compareTo(otherValue);
			  }
		case FLOAT:{
				   Float thisValue = (Float)this.properties[this.compIndex];
				   Float otherValue = (Float)other.properties[this.compIndex];
				   return thisValue.compareTo(otherValue);
			   }
		case DOUBLE:{
				    Double thisValue = (Double)this.properties[this.compIndex];
				    Double otherValue = (Double)other.properties[this.compIndex];
				    return thisValue.compareTo(otherValue);
			    }
		case STRING:{
				    String thisValue = (String)this.properties[this.compIndex];
				    String otherValue = (String)other.properties[this.compIndex];
				    return thisValue.compareTo(otherValue);
			    }
	}
	return 0;
}