Beispiel #1
0
 /**
  * Searches the stateObjects to find an equal model class to map to
  *
  * @param stateObjects A set of objects to search through
  * @return If the item was successfully mapped
  */
 @Override
 public boolean map(Set<SaharaItem> stateObjects) {
   boolean mapped = false;
   for (SaharaItem item : stateObjects) {
     if (item.equivalentTo(allocation)) {
       this.allocation = (Allocation) item;
       mapped = true;
     }
   }
   return mapped;
 }
Beispiel #2
0
 /**
  * Searches the stateObjects to find an equal model class to map to
  *
  * @param stateObjects A set of objects to search through
  * @return If the item was successfully mapped
  */
 @Override
 public boolean map(Set<SaharaItem> stateObjects) {
   boolean mapped_alloc = false;
   for (SaharaItem item : stateObjects) {
     if (item.equivalentTo(allocation)) {
       this.allocation = (Allocation) item;
       mapped_alloc = true;
     }
   }
   boolean mapped_proj = false;
   for (SaharaItem item : stateObjects) {
     if (item.equivalentTo(project)) {
       this.project = (Project) item;
       mapped_proj = true;
     }
   }
   boolean mapped_team = false;
   for (SaharaItem item : stateObjects) {
     if (item.equivalentTo(team)) {
       this.team = (Team) item;
       mapped_team = true;
     }
   }
   return mapped_alloc && mapped_proj && mapped_team;
 }