コード例 #1
0
ファイル: OrgRelation.java プロジェクト: djw1149/cougaar-glm
 public boolean same(Transferable other) {
   if (other instanceof OrgRelation) {
     OrgRelation or = (OrgRelation) other;
     return (getUID().equals(or.getUID()));
   }
   return false;
 }
コード例 #2
0
ファイル: OrgRelation.java プロジェクト: djw1149/cougaar-glm
  public boolean equals(Object o) {
    if (o instanceof OrgRelation) {
      OrgRelation or = (OrgRelation) o;

      return matches(getAssignedRole(), or.getAssignedRole())
          && matches(getRelationType(), or.getRelationType())
          && matches(getUID(), or.getUID())
          && matches(getOrgID(), or.getOrgID())
          && matches(getOtherOrgId(), or.getOtherOrgId())
          && matches(getForcePackageId(), or.getForcePackageId())
          && matches(getOplanUID(), or.getOplanUID())
          && matches(getTimeSpan(), or.getTimeSpan());
    } else return false;
  }
コード例 #3
0
ファイル: OrgRelation.java プロジェクト: djw1149/cougaar-glm
  public void setAll(Transferable other) {

    if (!(other instanceof OrgRelation)) {
      throw new IllegalArgumentException("Parameter is not an OrgRelation.");
    } else {
      OrgRelation or = (OrgRelation) other;
      relationType = or.getRelationType();
      orgID = or.getOrgID();
      forcePackageID = or.getForcePackageId();
      oplanUID = or.getOplanUID();
      timeSpan = or.getTimeSpan();
      otherOrgID = or.getOtherOrgId();
      role = or.getAssignedRole();
      setUID(or.getUID());
      setOwner(or.getOwner());
    } // else set everything
  } // setAll