EDU.utwente.CoCompose.translate
Class AppliedPatterns

java.lang.Object
  extended byEDU.utwente.CoCompose.translate.AppliedPatterns
All Implemented Interfaces:
java.lang.Cloneable

public class AppliedPatterns
extends java.lang.Object
implements java.lang.Cloneable

Caches applied SolutionPatterns during flattening.

Version:
0.1.20, 17 March 2004
Author:
Dennis Wagelaar

Constructor Summary
AppliedPatterns()
          Constructs an AppliedPatterns.
 
Method Summary
 void addAppliedPattern(SolutionPattern pattern, Model model, UniqueRealm typeRealm)
          Adds the SolutionPattern and its Model to the cache of applied patterns.
 void addValidatedPattern(SolutionPattern pattern)
          Adds the SolutionPattern as a validated pattern for this run.
 java.lang.Object clone()
          Creates a deep copy of this (cache only).
 boolean containsPattern(java.lang.String filename)
          Determines whether this pattern is already in the cache.
 Model getSolutionModel(java.lang.String filename)
          Retrieves the solution Model for the given solution pattern.
 UniqueRealm getTypeRealm(java.lang.String filename)
          Retrieves the type realm for the given solution pattern.
 boolean isValidatedPattern(java.lang.String filename)
          Determines whether the given solution pattern (by filename) has been validated.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppliedPatterns

public AppliedPatterns()
Constructs an AppliedPatterns.

Method Detail

clone

public java.lang.Object clone()
Creates a deep copy of this (cache only).

Returns:
The copy.

addAppliedPattern

public void addAppliedPattern(SolutionPattern pattern,
                              Model model,
                              UniqueRealm typeRealm)
Adds the SolutionPattern and its Model to the cache of applied patterns.

Parameters:
pattern - The applied solution pattern.
model - The applied solution model.
typeRealm - The composite type unique realm.

addValidatedPattern

public void addValidatedPattern(SolutionPattern pattern)
Adds the SolutionPattern as a validated pattern for this run. This information won't be saved on clone().

Parameters:
pattern - the validated solution pattern.

containsPattern

public boolean containsPattern(java.lang.String filename)
Determines whether this pattern is already in the cache.

Parameters:
filename - The solution pattern filename.
Returns:
True if the pattern is in the cache.

getSolutionModel

public Model getSolutionModel(java.lang.String filename)
Retrieves the solution Model for the given solution pattern.

Parameters:
filename - The solution pattern filename.
Returns:
The solution Model, if it is in the cache, null otherwise.

getTypeRealm

public UniqueRealm getTypeRealm(java.lang.String filename)
Retrieves the type realm for the given solution pattern.

Parameters:
filename - The solution pattern filename.
Returns:
The type realm, if it is in the cache, null otherwise.

isValidatedPattern

public boolean isValidatedPattern(java.lang.String filename)
Determines whether the given solution pattern (by filename) has been validated.

Returns:
True if this solution pattern has been validated.

toString

public java.lang.String toString()
See Also:
Object.toString()