@Override public String getString(int id) { assert id < _idToValueMap.size(); return _idToValueMap.get(id); } }
@Override public int put(String value) { int id = _valueToIdMap.getInt(value); if (id == INVALID_KEY) { id = _idToValueMap.size(); _valueToIdMap.put(value, id); _idToValueMap.add(value); } return id; }
@Override public int size() { return list.size(); }
@Override public void size(final int size) { synchronized (sync) { list.size(size); } } @Override
@Override public long size64() { return list.size(); } @Override
@Override public void size(final int size) { list.size(size); } @Override
/** Creates a new array list and fills it with a given type-specific list. * * @param l a type-specific list that will be used to fill the array list. */ public IdentityArrayList ( final ObjectList <? extends K> l ) { this( l.size() ); l.getElements( 0, a, 0, size = l.size() ); } /** Creates a new array list and fills it with the elements of a given array.
@Override public void size(final long size) { list.size(intIndex(size)); } @Override
/** Creates a new shift-add-xor signed string map using a given hash map. * * @param function a function mapping each string in <code>list</code> to its ordinal position. * @param list a list of strings. */ public LiterallySignedStringMap(final Object2LongFunction<? extends CharSequence> function, final ObjectList<? extends MutableString> list) { this.function = function; this.list = list; size = list.size(); for(int i = 0; i < size; i++) if (function.getLong(list.get(i)) != i) throw new IllegalArgumentException("Function and list do not agree"); defRetValue = -1; }
/** Creates a new shift-add-xor signed string map using a given hash map. * * @param function a function mapping each string in <code>list</code> to its ordinal position. * @param list a list of strings. */ public LiterallySignedStringMap( final Object2LongFunction<? extends CharSequence> function, final ObjectList<? extends MutableString> list ) { this.function = function; this.list = list; size = list.size(); for( int i = 0; i < size; i++ ) if ( function.getLong( list.get( i ) ) != i ) throw new IllegalArgumentException( "Function and list do not agree" ); defRetValue = -1; }
/** Creates a new shift-add-xor signed string map using a given hash map. * * @param function a function mapping each string in <code>list</code> to its ordinal position. * @param list a list of strings. */ public LiterallySignedStringMap( final Object2LongFunction<? extends CharSequence> function, final ObjectList<? extends MutableString> list ) { this.function = function; this.list = list; size = list.size(); for( int i = 0; i < size; i++ ) if ( function.getLong( list.get( i ) ) != i ) throw new IllegalArgumentException( "Function and list do not agree" ); defRetValue = -1; }
public void virtualField( final ObjectList<VirtualDocumentFragment> fragments ) throws IOException { nonTextZipDataOutputStream.writeInt( fragments.size() ); for ( VirtualDocumentFragment fragment: fragments ) { fragment.documentSpecifier().writeSelfDelimUTF8( nonTextZipOutputStream ); fragment.text().writeSelfDelimUTF8( nonTextZipOutputStream ); } }
public void virtualField( final ObjectList<VirtualDocumentFragment> fragments ) throws IOException { if ( DEBUG ) LOGGER.debug( "Going to write virtual field " + fragments + " for document #" + numberOfDocuments ); zipDataOutputStream.writeInt( fragments.size() ); for ( VirtualDocumentFragment fragment: fragments ) { fragment.documentSpecifier().writeSelfDelimUTF8( zipOut ); fragment.text().writeSelfDelimUTF8( zipOut ); } }
public void virtualField( final ObjectList<VirtualDocumentFragment> fragments ) throws IOException { if ( DEBUG ) LOGGER.debug( "Going to write virtual field " + fragments + " for document #" + numberOfDocuments ); zipDataOutputStream.writeInt( fragments.size() ); for ( VirtualDocumentFragment fragment: fragments ) { fragment.documentSpecifier().writeSelfDelimUTF8( zipOut ); fragment.text().writeSelfDelimUTF8( zipOut ); } }
public void virtualField( final ObjectList<VirtualDocumentFragment> fragments ) throws IOException { nonTextZipDataOutputStream.writeInt( fragments.size() ); for ( VirtualDocumentFragment fragment: fragments ) { fragment.documentSpecifier().writeSelfDelimUTF8( nonTextZipOutputStream ); fragment.text().writeSelfDelimUTF8( nonTextZipOutputStream ); } }
public void virtualField( final ObjectList<VirtualDocumentFragment> fragments ) throws IOException { if ( DEBUG ) LOGGER.debug( "Going to write virtual field " + fragments + " for document #" + numberOfDocuments ); zipDataOutputStream.writeInt( fragments.size() ); for ( VirtualDocumentFragment fragment: fragments ) { fragment.documentSpecifier().writeSelfDelimUTF8( zipOut ); fragment.text().writeSelfDelimUTF8( zipOut ); } }
public void virtualField( final ObjectList<VirtualDocumentFragment> fragments ) throws IOException { nonTextZipDataOutputStream.writeInt( fragments.size() ); for ( VirtualDocumentFragment fragment: fragments ) { fragment.documentSpecifier().writeSelfDelimUTF8( nonTextZipOutputStream ); fragment.text().writeSelfDelimUTF8( nonTextZipOutputStream ); } }