StructTypeID findStruct(String name) { // walk through the list, searching. Not the most efficient way, but this // in intended to be used rarely, so we keep it simple. // As an optimization, we can keep a hashmap of record name to its RTI, for later. for (FieldTypeInfo ti : typeInfos) { if ((0 == ti.getFieldID().compareTo(name)) && (ti.getTypeID().getTypeVal() == RIOType.STRUCT)) { return (StructTypeID) ti.getTypeID(); } } return null; }
StructTypeID findStruct(String name) { // walk through the list, searching. Not the most efficient way, but this // in intended to be used rarely, so we keep it simple. // As an optimization, we can keep a hashmap of record name to its RTI, for later. for (FieldTypeInfo ti : typeInfos) { if ((0 == ti.getFieldID().compareTo(name)) && (ti.getTypeID().getTypeVal() == RIOType.STRUCT)) { return (StructTypeID) ti.getTypeID(); } } return null; }
StructTypeID findStruct(String name) { // walk through the list, searching. Not the most efficient way, but this // in intended to be used rarely, so we keep it simple. // As an optimization, we can keep a hashmap of record name to its RTI, for later. for (FieldTypeInfo ti : typeInfos) { if ((0 == ti.getFieldID().compareTo(name)) && (ti.getTypeID().getTypeVal() == RIOType.STRUCT)) { return (StructTypeID) ti.getTypeID(); } } return null; }
/** * We use a basic hashcode implementation, since this class will likely not * be used as a hashmap key */ @Override public int hashCode() { return 37*17+typeIDElement.hashCode(); }
StructTypeID findStruct(String name) { // walk through the list, searching. Not the most efficient way, but this // in intended to be used rarely, so we keep it simple. // As an optimization, we can keep a hashmap of record name to its RTI, for later. for (FieldTypeInfo ti : typeInfos) { if ((0 == ti.getFieldID().compareTo(name)) && (ti.getTypeID().getTypeVal() == RIOType.STRUCT)) { return (StructTypeID) ti.getTypeID(); } } return null; }
/** * We use a basic hashcode implementation, since this class will likely not * be used as a hashmap key */ @Override public int hashCode() { return 37*17+typeIDElement.hashCode(); }
StructTypeID findStruct(String name) { // walk through the list, searching. Not the most efficient way, but this // in intended to be used rarely, so we keep it simple. // As an optimization, we can keep a hashmap of record name to its RTI, for later. for (FieldTypeInfo ti : typeInfos) { if ((0 == ti.getFieldID().compareTo(name)) && (ti.getTypeID().getTypeVal() == RIOType.STRUCT)) { return (StructTypeID) ti.getTypeID(); } } return null; }
/** * We use a basic hashcode implementation, since this class will likely not * be used as a hashmap key */ @Override public int hashCode() { return 37*17+typeIDElement.hashCode(); }