public static long sizeOf(Struct sct){
  Iterator<Entry<Key,Object>> it=sct.entryIterator();
  Entry<Key,Object> e;
  long size=0;
  while (it.hasNext()) {
    e=it.next();
    size+=SizeOf.size(e.getKey());
    size+=SizeOf.size(e.getValue());
  }
  return size;
}

public static long sizeOf ( Struct sct ) { Iterator < Entry < Key , Object > > it = sct . entryIterator ( ) ; Entry < Key , Object > e ; long size = 0 ; while ( it . hasNext ( ) ) { e = it . next ( ) ; size += SizeOf . size ( e . getKey ( ) ) ; size += SizeOf . size ( e . getValue ( ) ) ; } return size ; }
return the size of given struct , size of values + keys
