equal
deleted
inserted
replaced
235 TabularType valueType = value.getTabularType(); |
235 TabularType valueType = value.getTabularType(); |
236 return isAssignableFrom(valueType); |
236 return isAssignableFrom(valueType); |
237 } |
237 } |
238 |
238 |
239 @Override |
239 @Override |
240 boolean isAssignableFrom(OpenType ot) { |
240 boolean isAssignableFrom(OpenType<?> ot) { |
241 if (!(ot instanceof TabularType)) |
241 if (!(ot instanceof TabularType)) |
242 return false; |
242 return false; |
243 TabularType tt = (TabularType) ot; |
243 TabularType tt = (TabularType) ot; |
244 if (!getTypeName().equals(tt.getTypeName()) || |
244 if (!getTypeName().equals(tt.getTypeName()) || |
245 !getIndexNames().equals(tt.getIndexNames())) |
245 !getIndexNames().equals(tt.getIndexNames())) |
327 // |
327 // |
328 if (myHashCode == null) { |
328 if (myHashCode == null) { |
329 int value = 0; |
329 int value = 0; |
330 value += this.getTypeName().hashCode(); |
330 value += this.getTypeName().hashCode(); |
331 value += this.rowType.hashCode(); |
331 value += this.rowType.hashCode(); |
332 for (Iterator k = indexNames.iterator(); k.hasNext(); ) { |
332 for (String index : indexNames) |
333 value += k.next().hashCode(); |
333 value += index.hashCode(); |
334 } |
|
335 myHashCode = Integer.valueOf(value); |
334 myHashCode = Integer.valueOf(value); |
336 } |
335 } |
337 |
336 |
338 // return always the same hash code for this instance (immutable) |
337 // return always the same hash code for this instance (immutable) |
339 // |
338 // |
362 .append("(name=") |
361 .append("(name=") |
363 .append(getTypeName()) |
362 .append(getTypeName()) |
364 .append(",rowType=") |
363 .append(",rowType=") |
365 .append(rowType.toString()) |
364 .append(rowType.toString()) |
366 .append(",indexNames=("); |
365 .append(",indexNames=("); |
367 int i=0; |
366 String sep = ""; |
368 Iterator k = indexNames.iterator(); |
367 for (String index : indexNames) { |
369 while( k.hasNext() ) { |
368 result.append(sep).append(index); |
370 if (i > 0) result.append(","); |
369 sep = ","; |
371 result.append(k.next().toString()); |
|
372 i++; |
|
373 } |
370 } |
374 result.append("))"); |
371 result.append("))"); |
375 myToString = result.toString(); |
372 myToString = result.toString(); |
376 } |
373 } |
377 |
374 |