---
title: "Code Pieces"
author: "eric2500"
date: "2013-07-16T00:16:43Z"
tags: []
categories: ["编程语言"]
slug: "code-pieces"
draft: false
lastmod: "2013-07-16T00:16:43Z"
id: 1906817
url: "https://eric2500.iteye.com/blog/1906817"
---

```java

    public boolean equals(final Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        Url other = (Url) obj;
        if (link == null) {
            if (other.link != null) {
                return false;
            }
        } else if (!link.equals(other.link)) {
            return false;
        }
        return true;
    }

```