public void add( short[] vals ) { synchronized( mutex ) { list.add( vals ); } } public void add( short[] vals, int offset, int length ) {
@Override public Short get( int index ) { short value = list.get( index ); if ( value == list.getNoEntryValue() ) return null; else return Short.valueOf( value ); }
@Override public int size() { return list.size(); }
@Override public Short set( int index, Short value ) { short previous_value = list.set( index, value ); if ( previous_value == list.getNoEntryValue() ) return null; else return Short.valueOf( previous_value ); }
@Override public Short remove( int index ) { short previous_value = list.removeAt( index ); if ( previous_value == list.getNoEntryValue() ) return null; else return Short.valueOf( previous_value ); }
public short get( int index ) { synchronized( mutex ) { return list.get( index ); } } public short set( int index, short element) {
public int indexOf( int offset, short value ) { synchronized( mutex ) { return list.indexOf( offset, value ); } } public int lastIndexOf( int offset, short value ) {
public int binarySearch( short value ) { synchronized( mutex ) { return list.binarySearch( value ); } } public int binarySearch( short value, int fromIndex, int toIndex ) {
public short set( int index, short element) { synchronized( mutex ) { return list.set( index, element ); } } public void set( int offset, short[] values ) {
public void fill( short val ) { synchronized( mutex ) { list.fill( val ); } } public void fill( int fromIndex, int toIndex, short val ) {
public TShortList grep( TShortProcedure condition ) { synchronized( mutex ) { return list.grep( condition ); } } public TShortList inverseGrep( TShortProcedure condition ) {
public boolean forEachDescending( TShortProcedure procedure ) { synchronized( mutex ) { return list.forEachDescending( procedure ); } }
/** * Replaces the current buffer data with the list of bytes in the give {@link gnu.trove.list.TShortList} This method arbitrarily creates data for the ByteBuffer regardless of the data type of the * vertex attribute. * * @param list to set */ public void setData(TShortList list) { this.buffer = CausticUtil.createByteBuffer(list.size() * DataType.SHORT.getByteSize()); final TShortIterator iterator = list.iterator(); while (iterator.hasNext()) { buffer.putShort(iterator.next()); } }
public TShortLinkedList(TShortList list) { no_entry_value = list.getNoEntryValue(); // for (TShortIterator iterator = list.iterator(); iterator.hasNext();) { short next = iterator.next(); add(next); } }
@Override public Short set( int index, Short value ) { short previous_value = list.set( index, value ); if ( previous_value == list.getNoEntryValue() ) return null; else return Short.valueOf( previous_value ); }
/** {@inheritDoc} */ @Override public boolean equals( Object other ) { if ( other == this ) { return true; } if ( !( other instanceof TShortList ) ) return false; if ( other instanceof TShortArrayList ) { TShortArrayList that = ( TShortArrayList )other; if ( that.size() != this.size() ) return false; for ( int i = _pos; i-- > 0; ) { if ( this._data[ i ] != that._data[ i ] ) { return false; } } return true; } else { TShortList that = ( TShortList )other; if ( that.size() != this.size() ) return false; for( int i = 0; i < _pos; i++ ) { if ( this._data[ i ] != that.get( i ) ) { return false; } } return true; } }
public short get( int index ) { return list.get( index ); } public int indexOf( short o ) { return list.indexOf( o ); }
@Override public Short remove( int index ) { short previous_value = list.removeAt( index ); if ( previous_value == list.getNoEntryValue() ) return null; else return Short.valueOf( previous_value ); }
public int indexOf( short o ) { synchronized( mutex ) { return list.indexOf( o ); } } public int lastIndexOf( short o ) {