Example usage for io.netty.util HashingStrategy equals

List of usage examples for io.netty.util HashingStrategy equals

Introduction

In this page you can find the example usage for io.netty.util HashingStrategy equals.

Prototype

boolean equals(T a, T b);

Source Link

Document

Returns true if the arguments are equal to each other and false otherwise.

Usage

From source file:io.vertx.core.http.impl.headers.VertxHttpHeaders.java

License:Open Source License

@Override
public boolean contains(CharSequence name, CharSequence value, boolean ignoreCase) {
    int h = AsciiString.hashCode(name);
    int i = index(h);
    VertxHttpHeaders.MapEntry e = entries[i];
    HashingStrategy<CharSequence> strategy = ignoreCase ? CASE_INSENSITIVE_HASHER : CASE_SENSITIVE_HASHER;
    while (e != null) {
        if (e.hash == h && AsciiString.contentEqualsIgnoreCase(name, e.key)) {
            if (strategy.equals(value, e.getValue())) {
                return true;
            }/*  ww  w . j  a va 2s.co m*/
        }
        e = e.next;
    }
    return false;
}