Skip to content

Commit

Permalink
Change hasException to hasThrowable
Browse files Browse the repository at this point in the history
  • Loading branch information
benjchristensen committed Aug 1, 2013
1 parent 349c11e commit 0531b8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rxjava-core/src/main/java/rx/Notification.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public boolean hasValue() {
*
* @return a value indicating whether this notification has an exception.
*/
public boolean hasException() {
public boolean hasThrowable() {
return isOnError() && throwable != null;
}

Expand Down Expand Up @@ -125,7 +125,7 @@ public String toString() {
StringBuilder str = new StringBuilder("[").append(super.toString()).append(" ").append(getKind());
if (hasValue())
str.append(" ").append(getValue());
if (hasException())
if (hasThrowable())
str.append(" ").append(getThrowable().getMessage());
str.append("]");
return str.toString();
Expand All @@ -136,7 +136,7 @@ public int hashCode() {
int hash = getKind().hashCode();
if (hasValue())
hash = hash * 31 + getValue().hashCode();
if (hasException())
if (hasThrowable())
hash = hash * 31 + getThrowable().hashCode();
return hash;
}
Expand All @@ -154,7 +154,7 @@ public boolean equals(Object obj) {
return false;
if (hasValue() && !getValue().equals(notification.getValue()))
return false;
if (hasException() && !getThrowable().equals(notification.getThrowable()))
if (hasThrowable() && !getThrowable().equals(notification.getThrowable()))
return false;
return true;
}
Expand Down

0 comments on commit 0531b8b

Please sign in to comment.