comparison src/luan/LuanTable.java @ 1100:ad6b3b9fef40

add Table.is_empty() and Table.size()
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 21 May 2017 16:12:22 -0600
parents 2443152dc2f1
children 22652f4020fb
comparison
equal deleted inserted replaced
1099:a5406f076726 1100:ad6b3b9fef40
475 n ^= map.hashCode(); 475 n ^= map.hashCode();
476 if( list != null ) 476 if( list != null )
477 n ^= list.hashCode(); 477 n ^= list.hashCode();
478 return n; 478 return n;
479 } 479 }
480
481 public boolean rawIsEmpty() {
482 return (map==null || map.isEmpty()) && (list==null || list.isEmpty());
483 }
484
485 public int rawSize() {
486 int n = 0;
487 if( map != null )
488 n += map.size();
489 if( list != null )
490 n += list.size();
491 return n;
492 }
480 } 493 }