コード例 #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 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
コード例 #3
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;
  }
コード例 #4
0
ファイル: OrgRelation.java プロジェクト: djw1149/cougaar-glm
  public Object clone() {
    OrgRelation or = new OrgRelation(orgID, oplanUID);
    or.setForcePackageId(forcePackageID);
    or.setRelationType(relationType);
    or.setAssignedRole(role);
    or.setOtherOrgId(otherOrgID);
    or.setUID(getUID());
    or.setOwner(getOwner());

    if (timeSpan != null) or.setTimeSpan((TimeSpan) timeSpan.clone());
    return or;
  } // clone