Package org.mongodb.meclipse.views

Source Code of org.mongodb.meclipse.views.FilterPlacement

package org.mongodb.meclipse.views;

import org.mongodb.meclipse.views.objects.TreeParent;

public final class FilterPlacement {
  private String placementStr;

  public FilterPlacement(TreeParent parent) {
    TreeParent treeObj = parent;
    do {
      if (placementStr == null)
        placementStr = treeObj.getName();
      else
        placementStr = treeObj.getName() + "." + placementStr;
      treeObj = treeObj.getParent();
    } while (treeObj != null);
  }

  public boolean equals(Object obj) {
    if (obj == null)
      return false;

    if (!(obj instanceof FilterPlacement))
      return false;

    return placementStr.equals(((FilterPlacement) obj).placementStr);
  }

  public int hashCode() {
    int hash = placementStr.hashCode();
    return hash;
  }
}
TOP

Related Classes of org.mongodb.meclipse.views.FilterPlacement

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.