/** Checks whether the given float array is in this filter. * * @param a a float array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final float[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given double array is in this filter. * * @param a a double array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final double[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given int array is in this filter. * * @param a an int array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final int[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given double array is in this filter. * * @param a a double array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final double[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Adds a double array to the filter. * * @param a a double array. * @return true if this filter was modified (i.e., neither <code>a</code> nor any * other element with the same hash sequence as <code>a</code> was already in this filter). */ public boolean add( final double[] a ) { int i = d, l = a.length; long bits[] = this.bits; boolean alreadySet = true; while( i-- != 0 ) alreadySet &= set( bits, hash( a, l, i ) ); if ( ! alreadySet ) size++; return ! alreadySet; }
/** Checks whether the given character array is in this filter. * * @param a a character array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final char[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given float array is in this filter. * * @param a a float array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final float[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given short array is in this filter. * * @param a a short array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final short[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given long array is in this filter. * * @param a a long array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final long[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given short array is in this filter. * * @param a a short array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final short[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given long array is in this filter. * * @param a a long array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final long[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given character array is in this filter. * * @param a a character array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final char[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Checks whether the given int array is in this filter. * * @param a an int array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final int[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Adds a character sequence to the filter. * * @param s a character sequence. * @return true if this filter was modified (i.e., neither <code>s</code> nor any * other element with the same hash sequence as <code>s</code> was already in this filter). */ public boolean add( final CharSequence s ) { int i = d, l = s.length(); long bits[] = this.bits; boolean alreadySet = true; while( i-- != 0 ) alreadySet &= set( bits, hash( s, l, i ) ); if ( ! alreadySet ) size++; return ! alreadySet; }
/** Adds a float array to the filter. * * @param a a float array. * @return true if this filter was modified (i.e., neither <code>a</code> nor any * other element with the same hash sequence as <code>a</code> was already in this filter). */ public boolean add( final float[] a ) { int i = d, l = a.length; long bits[] = this.bits; boolean alreadySet = true; while( i-- != 0 ) alreadySet &= set( bits, hash( a, l, i ) ); if ( ! alreadySet ) size++; return ! alreadySet; }
/** Checks whether the given byte array is in this filter. * * @param a a byte array. * @return true if <code>a</code> (or some element * with the same hash sequence as <code>a</code>) is in the filter. * @see #contains(CharSequence) */ public boolean contains( final byte[] a ) { int i = d, l = a.length; long bits[] = this.bits; while( i-- != 0 ) if ( ! get( bits, hash( a, l, i ) ) ) return false; return true; }
/** Adds a character sequence to the filter. * * @param s a character sequence. * @return true if this filter was modified (i.e., neither <code>s</code> nor any * other element with the same hash sequence as <code>s</code> was already in this filter). */ public boolean add( final CharSequence s ) { int i = d, l = s.length(); long bits[] = this.bits; boolean alreadySet = true; while( i-- != 0 ) alreadySet &= set( bits, hash( s, l, i ) ); if ( ! alreadySet ) size++; return ! alreadySet; }
/** Adds a long array to the filter. * * @param a a long array. * @return true if this filter was modified (i.e., neither <code>a</code> nor any * other element with the same hash sequence as <code>a</code> was already in this filter). */ public boolean add( final long[] a ) { int i = d, l = a.length; long bits[] = this.bits; boolean alreadySet = true; while( i-- != 0 ) alreadySet &= set( bits, hash( a, l, i ) ); if ( ! alreadySet ) size++; return ! alreadySet; }
/** Adds a short array to the filter. * * @param a a short array. * @return true if this filter was modified (i.e., neither <code>a</code> nor any * other element with the same hash sequence as <code>a</code> was already in this filter). */ public boolean add( final short[] a ) { int i = d, l = a.length; long bits[] = this.bits; boolean alreadySet = true; while( i-- != 0 ) alreadySet &= set( bits, hash( a, l, i ) ); if ( ! alreadySet ) size++; return ! alreadySet; }
/** Adds an int array to the filter. * * @param a an int array. * @return true if this filter was modified (i.e., neither <code>a</code> nor any * other element with the same hash sequence as <code>a</code> was already in this filter). */ public boolean add( final int[] a ) { int i = d, l = a.length; long bits[] = this.bits; boolean alreadySet = true; while( i-- != 0 ) alreadySet &= set( bits, hash( a, l, i ) ); if ( ! alreadySet ) size++; return ! alreadySet; }