Ignore:
Timestamp:
05/03/16 17:06:33 (8 years ago)
Author:
pharms
Message:
  • implemented some performance improvements
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java

    r1400 r2126  
    8181     * </p> 
    8282     */ 
    83     private Collection<ITaskInstance> instances = new HashSet<ITaskInstance>(); 
     83    private final Collection<ITaskInstance> instances = new HashSet<ITaskInstance>(); 
     84     
     85    /** 
     86     * <p> 
     87     * the unmodifiable view on the instances of this task 
     88     * </p> 
     89     */ 
     90    private final Collection<ITaskInstance> unmodifiableInstances; 
    8491     
    8592    /** 
     
    107114            throw new IllegalArgumentException("type must not be null"); 
    108115        } 
     116         
     117        unmodifiableInstances = Collections.unmodifiableCollection(instances); 
    109118    } 
    110119 
     
    154163    @Override 
    155164    public Collection<ITaskInstance> getInstances() { 
    156         return Collections.unmodifiableCollection(instances); 
     165        return unmodifiableInstances; 
    157166    } 
    158167 
Note: See TracChangeset for help on using the changeset viewer.