public boolean isSameType ( FieldInfo field ) { // Copy this data to a field //Change this to lock the objects down first! boolean bSameType = false ; if ( this . getClass ( ) . getName ( ) . equals ( field . getClass ( ) . getName ( ) ) ) bSameType = true ; else { Object data = this . getData ( ) ; Class < ? > classData = this . getDataClass ( ) ; if ( data != null ) classData = data . getClass ( ) ; Object fieldData = field . getData ( ) ; Class < ? > classField = field . getDataClass ( ) ; if ( fieldData != null ) classField = fieldData . getClass ( ) ; if ( classData . equals ( classField ) ) bSameType = true ; } return bSameType ; }
Are the data in these fields the same type?