@Override public int size() { return list.size(); }
@Override public int size() { return list.size(); }
@Override public int size() { return list.size(); }
/** Return the number of vertices currently stored in this VertexStore. */ public int getVertexCount() { return vertexFlags.size(); }
@Override public int size() { return list.size(); }
/** Return the number of vertices currently stored in this VertexStore. */ public int getVertexCount() { return vertexFlags.size(); }
@Override public int size() { return list.size(); }
public static ConfigurationSpaceName[] fromBytes(TByteList enumListAsBytes) { if (enumListAsBytes == null) return null; ConfigurationSpaceName[] enumArray = new ConfigurationSpaceName[enumListAsBytes.size()]; for (int i = 0; i < enumListAsBytes.size(); i++) enumArray[i] = fromByte(enumListAsBytes.get(i)); return enumArray; }
/** * Replaces the current buffer data with the list of bytes in the give {@link gnu.trove.list.TByteList} This method arbitrarily creates data for the ByteBuffer regardless of the data type of the * vertex attribute. * * @param list to set */ public void setData(TByteList list) { this.buffer = CausticUtil.createByteBuffer(list.size()); this.buffer.put(list.toArray()); }
public int indexOf(TByteList bytes, int minOffset, byte [] query) { return indexOf(bytes.toArray(), minOffset, bytes.size(), query); }
public int indexOf(TByteList bytes, int minOffset, byte [] query) { return indexOf(bytes.toArray(), minOffset, bytes.size(), query); }
/** * Add a vertex, specifying its coordinates in fixed-point lat and lon. * @return the index of the new vertex. */ public int addVertexFixed (int fixedLat, int fixedLon) { int vertexIndex = vertexFlags.size(); fixedLats.add(fixedLat); fixedLons.add(fixedLon); vertexFlags.add((byte)0); return vertexIndex; }
/** * Add a vertex, specifying its coordinates in fixed-point lat and lon. * @return the index of the new vertex. */ public int addVertexFixed (int fixedLat, int fixedLon) { int vertexIndex = vertexFlags.size(); fixedLats.add(fixedLat); fixedLons.add(fixedLon); vertexFlags.add((byte)0); return vertexIndex; }
while (buffer.size() < maxSize && (data = inputStream.read()) > -1) buffer.add((byte) data); final String dataString = new String(buffer.toArray(), 0, buffer.size()); final String[] strings = parser.parse(dataString); final String leftOvers = parser.getLeftOverString(); buffer.size() - leftOvers.length(), buffer.size()); else buffer.clear();
while (buffer.size() < maxSize && (data = inputStream.read()) > -1) buffer.add((byte) data); final String dataString = new String(buffer.toArray(), 0, buffer.size()); final String[] strings = parser.parse(dataString); final String leftOvers = parser.getLeftOverString(); buffer.size() - leftOvers.length(), buffer.size()); else buffer.clear();
/** {@inheritDoc} */ @Override public boolean equals( Object other ) { if ( other == this ) { return true; } if ( !( other instanceof TByteList ) ) return false; if ( other instanceof TByteArrayList ) { TByteArrayList that = ( TByteArrayList )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 { TByteList that = ( TByteList )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; } }