/** * Although users won't typically care what the underlying implementation * of a context is, they will need to do comparisons. * So, although this method is provided by Java.Object we have it here * to ensure that we don't forget to implement it! * * Two instances are equal if the refer to the same transaction. */ public boolean equals (Object obj) { if (obj != null) { if (obj == this) return true; else { if (obj instanceof ActivityHandleImple) { if (_theActivity.equals(obj)) return true; } } } return false; }
/** * Although users won't typically care what the underlying implementation * of a context is, they will need to do comparisons. * So, although this method is provided by Java.Object we have it here * to ensure that we don't forget to implement it! * * Two instances are equal if the refer to the same transaction. */ public boolean equals (Object obj) { if (obj != null) { if (obj == this) return true; else { if (obj instanceof ActivityHandleImple) { if (_theActivity.equals(obj)) return true; } } } return false; }
/** * Although users won't typically care what the underlying implementation * of a context is, they will need to do comparisons. * So, although this method is provided by Java.Object we have it here * to ensure that we don't forget to implement it! * * Two instances are equal if the refer to the same transaction. */ public boolean equals (Object obj) { if (obj != null) { if (obj == this) return true; else { if (obj instanceof ActivityHandleImple) { if (_theActivity.equals(obj)) return true; } } } return false; }
public final boolean remove (ActivityImple act) { if (act == null) { return false; } boolean found = false; synchronized (_list) { Iterator<ReaperElement> iter = _list.iterator(); ReaperElement e = null; while (iter.hasNext() && !found) { e = iter.next(); if (e._activity.equals(act)) { _list.remove(e); found = true; } } } if (found) { // notify the reaper thread that the list has changed synchronized (_reaperThread) { _reaperThread.notify(); } } return false; }
public final boolean remove (ActivityImple act) { if (act == null) { return false; } boolean found = false; synchronized (_list) { Iterator<ReaperElement> iter = _list.iterator(); ReaperElement e = null; while (iter.hasNext() && !found) { e = iter.next(); if (e._activity.equals(act)) { _list.remove(e); found = true; } } } if (found) { // notify the reaper thread that the list has changed synchronized (_reaperThread) { _reaperThread.notify(); } } return false; }
public final boolean remove (ActivityImple act) { if (act == null) { return false; } boolean found = false; synchronized (_list) { Iterator<ReaperElement> iter = _list.iterator(); ReaperElement e = null; while (iter.hasNext() && !found) { e = iter.next(); if (e._activity.equals(act)) { _list.remove(e); found = true; } } } if (found) { // notify the reaper thread that the list has changed synchronized (_reaperThread) { _reaperThread.notify(); } } return false; }
public final boolean remove (ActivityImple act) { if (act == null) { return false; } boolean found = false; synchronized (_list) { Iterator<ReaperElement> iter = _list.iterator(); ReaperElement e = null; while (iter.hasNext() && !found) { e = iter.next(); if (e._activity.equals(act)) { _list.remove(e); found = true; } } } if (found) { // notify the reaper thread that the list has changed synchronized (_reaperThread) { _reaperThread.notify(); } } return false; }
/** * Although users won't typically care what the underlying implementation * of a context is, they will need to do comparisons. * So, although this method is provided by Java.Object we have it here * to ensure that we don't forget to implement it! * * Two instances are equal if the refer to the same transaction. */ public boolean equals (Object obj) { if (obj != null) { if (obj == this) return true; else { if (obj instanceof ActivityHandleImple) { ActivityImple compare = ((ActivityHandleImple) obj).getActivity(); if (_theActivity.equals(compare)) return true; } } } return false; }