public String toString(){ String s = ""; s += "char type number:\t" + charfreq.size()+"\n"; s += "char number:\t" + charnum+"\n"; return s; }
/** {@inheritDoc} */ public int[] values() { int[] vals = new int[size()]; int[] v = _values; byte[] states = _states; for ( int i = v.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { vals[j++] = v[i]; } } return vals; }
/** {@inheritDoc} */ public char[] keys() { char[] keys = new char[size()]; char[] k = _set; byte[] states = _states; for ( int i = k.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { keys[j++] = k[i]; } } return keys; }
/** {@inheritDoc} */ public char[] keys( char[] array ) { int size = size(); if ( array.length < size ) { array = new char[size]; } char[] keys = _set; byte[] states = _states; for ( int i = keys.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { array[j++] = keys[i]; } } return array; }
/** {@inheritDoc} */ public int[] values( int[] array ) { int size = size(); if ( array.length < size ) { array = new int[size]; } int[] v = _values; byte[] states = _states; for ( int i = v.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { array[j++] = v[i]; } } return array; }
/** {@inheritDoc} */ @Override public boolean equals( Object other ) { if ( ! ( other instanceof TCharIntMap ) ) { return false; } TCharIntMap that = ( TCharIntMap ) other; if ( that.size() != this.size() ) { return false; } int[] values = _values; byte[] states = _states; int this_no_entry_value = getNoEntryValue(); int that_no_entry_value = that.getNoEntryValue(); for ( int i = values.length; i-- > 0; ) { if ( states[i] == FULL ) { char key = _set[i]; int that_value = that.get( key ); int this_value = values[i]; if ( ( this_value != that_value ) && ( this_value != this_no_entry_value ) && ( that_value != that_no_entry_value ) ) { return false; } } } return true; }
/** {@inheritDoc} */ public char[] keys() { char[] keys = new char[size()]; char[] k = _set; byte[] states = _states; for ( int i = k.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { keys[j++] = k[i]; } } return keys; }
/** {@inheritDoc} */ public int[] values() { int[] vals = new int[size()]; int[] v = _values; byte[] states = _states; for ( int i = v.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { vals[j++] = v[i]; } } return vals; }
/** {@inheritDoc} */ @Override public char[] keys() { char[] keys = new char[size()]; char[] k = _set; byte[] states = _states; for ( int i = k.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { keys[j++] = k[i]; } } return keys; }
/** {@inheritDoc} */ public char[] keys() { char[] keys = new char[size()]; char[] k = _set; byte[] states = _states; for ( int i = k.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { keys[j++] = k[i]; } } return keys; }
/** {@inheritDoc} */ public int[] values() { int[] vals = new int[size()]; int[] v = _values; byte[] states = _states; for ( int i = v.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { vals[j++] = v[i]; } } return vals; }
/** {@inheritDoc} */ @Override public int[] values() { int[] vals = new int[size()]; int[] v = _values; byte[] states = _states; for ( int i = v.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { vals[j++] = v[i]; } } return vals; }
/** {@inheritDoc} */ public char[] keys( char[] array ) { int size = size(); if ( array.length < size ) { array = new char[size]; } char[] keys = _set; byte[] states = _states; for ( int i = keys.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { array[j++] = keys[i]; } } return array; }
/** {@inheritDoc} */ public int[] values( int[] array ) { int size = size(); if ( array.length < size ) { array = new int[size]; } int[] v = _values; byte[] states = _states; for ( int i = v.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { array[j++] = v[i]; } } return array; }
/** {@inheritDoc} */ public char[] keys( char[] array ) { int size = size(); if ( array.length < size ) { array = new char[size]; } char[] keys = _set; byte[] states = _states; for ( int i = keys.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { array[j++] = keys[i]; } } return array; }
/** {@inheritDoc} */ @Override public int[] values( int[] array ) { int size = size(); if ( array.length < size ) { array = new int[size]; } int[] v = _values; byte[] states = _states; for ( int i = v.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { array[j++] = v[i]; } } return array; }
/** {@inheritDoc} */ public int[] values() { int[] vals = new int[size()]; if ( vals.length == 0 ) { return vals; // nothing to copy } int[] v = _values; byte[] states = _states; for ( int i = v.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { vals[j++] = v[i]; } } return vals; }
/** {@inheritDoc} */ public char[] keys() { char[] keys = new char[size()]; if ( keys.length == 0 ) { return keys; // nothing to copy } char[] k = _set; byte[] states = _states; for ( int i = k.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { keys[j++] = k[i]; } } return keys; }
/** {@inheritDoc} */ @Override public char[] keys( char[] array ) { int size = size(); if ( array.length < size ) { array = new char[size]; } char[] keys = _set; byte[] states = _states; for ( int i = keys.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { array[j++] = keys[i]; } } return array; }
/** {@inheritDoc} */ public int[] values( int[] array ) { int size = size(); if ( array.length < size ) { array = new int[size]; } int[] v = _values; byte[] states = _states; for ( int i = v.length, j = 0; i-- > 0; ) { if ( states[i] == FULL ) { array[j++] = v[i]; } } return array; }