Revision 6888 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/ProjectTable.java

View differences:

ProjectTable.java
41 41
package com.iver.cit.gvsig.project;
42 42

  
43 43
import java.io.IOException;
44
import java.lang.reflect.Field;
44 45
import java.text.DateFormat;
45 46
import java.util.ArrayList;
46 47
import java.util.Date;
......
799 800
	public int getColumnCount() {
800 801
		return columns.size();
801 802
	}
803

  
804
//	public int computeSignature() {
805
//		int result = 17;
806
//
807
//		Class clazz = getClass();
808
//		Field[] fields = clazz.getDeclaredFields();
809
//		for (int i = 0; i < fields.length; i++) {
810
//			try {
811
//				String type = fields[i].getType().getName();
812
//				if (type.equals("boolean")) {
813
//					result += 37 + ((fields[i].getBoolean(this)) ? 1 : 0);
814
//				} else if (type.equals("java.lang.String")) {
815
//					Object v = fields[i].get(this);
816
//					if (v == null) {
817
//						result += 37;
818
//						continue;
819
//					}
820
//					char[] chars = ((String) v).toCharArray();
821
//					for (int j = 0; j < chars.length; j++) {
822
//						result += 37 + (int) chars[i];
823
//					}
824
//				} else if (type.equals("byte")) {
825
//					result += 37 + (int) fields[i].getByte(this);
826
//				} else if (type.equals("char")) {
827
//					result += 37 + (int) fields[i].getChar(this);
828
//				} else if (type.equals("short")) {
829
//					result += 37 + (int) fields[i].getShort(this);
830
//				} else if (type.equals("int")) {
831
//					result += 37 + fields[i].getInt(this);
832
//				} else if (type.equals("long")) {
833
//					long f = fields[i].getLong(this) ;
834
//					result += 37 + (f ^ (f >>> 32));
835
//				} else if (type.equals("float")) {
836
//					result += 37 + Float.floatToIntBits(fields[i].getFloat(this));
837
//				} else if (type.equals("double")) {
838
//					long f = Double.doubleToLongBits(fields[i].getDouble(this));
839
//					result += 37 + (f ^ (f >>> 32));
840
//				} else {
841
//					Object obj = fields[i].get(this);
842
//					result += 37 + ((obj != null)? obj.hashCode() : 0);
843
//				}
844
//			} catch (Exception e) { e.printStackTrace(); }
845
//
846
//		}
847
//		return result;
848
//	}
802 849
}

Also available in: Unified diff