Home / Function/ equals() — netty Function Reference

equals() — netty Function Reference

Architecture documentation for the equals() function in DefaultCookie.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9b01715d_cb60_416c_d1f8_6154480e1584["equals()"]
  fc5bf564_9f72_12b2_a152_98889e5026ac["DefaultCookie"]
  9b01715d_cb60_416c_d1f8_6154480e1584 -->|defined in| fc5bf564_9f72_12b2_a152_98889e5026ac
  style 9b01715d_cb60_416c_d1f8_6154480e1584 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/cookie/DefaultCookie.java lines 167–201

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (!(o instanceof Cookie)) {
            return false;
        }

        Cookie that = (Cookie) o;
        if (!name().equals(that.name())) {
            return false;
        }

        if (path() == null) {
            if (that.path() != null) {
                return false;
            }
        } else if (that.path() == null) {
            return false;
        } else if (!path().equals(that.path())) {
            return false;
        }

        if (domain() == null) {
            if (that.domain() != null) {
                return false;
            }
        } else {
            return domain().equalsIgnoreCase(that.domain());
        }

        return true;
    }

Subdomains

Frequently Asked Questions

What does equals() do?
equals() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/cookie/DefaultCookie.java.
Where is equals() defined?
equals() is defined in codec-http/src/main/java/io/netty/handler/codec/http/cookie/DefaultCookie.java at line 167.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free