Java tutorial
/* * Copyright (c) 2015 Complexible Inc. <http://complexible.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.complexible.clearbit; import com.google.common.base.MoreObjects; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; /** * <p></p> * * @author Michael Grove * @since 0.1 * @version 0.1 */ public final class GoogleRank { private long mRank; public long getRank() { return mRank; } public void setRank(final long theRank) { mRank = theRank; } /** * @{inheritDoc} */ @Override public String toString() { return MoreObjects.toStringHelper("Google").add("Rank", mRank).toString(); } /** * @{inheritDoc} */ @Override public int hashCode() { return Longs.hashCode(mRank); } /** * @{inheritDoc} */ @Override public boolean equals(final Object theObj) { if (theObj == this) { return true; } else if (theObj instanceof GoogleRank) { GoogleRank aObj = (GoogleRank) theObj; return mRank == aObj.mRank; } else { return false; } } }