public int size ( ) { int size = cleared ? 0 : snapshot . size ( ) ; for ( Map . Entry < RowKey , AssociationOperation > op : currentState . entrySet ( ) ) { switch ( op . getValue ( ) . getType ( ) ) { case PUT : if ( cleared || ! snapshot . containsKey ( op . getKey ( ) ) ) { size ++ ; } break ; case REMOVE : if ( ! cleared && snapshot . containsKey ( op . getKey ( ) ) ) { size -- ; } break ; } } return size ; }
Returns the number of rows within this association .