コード例 #1
0
ファイル: FeatureMap.java プロジェクト: Kaljurand/AceWiki
 /**
  * This method detects whether this feature map can unify with the given feature map. Neither of
  * the two feature maps are changed.
  *
  * @param featureMap The feature map for the unification check.
  * @return true if the two feature map can unify.
  */
 public boolean canUnify(FeatureMap featureMap) {
   if (!isSimilar(featureMap)) return false;
   FeatureMap thisC = deepCopy();
   FeatureMap otherC = featureMap.deepCopy();
   try {
     thisC.tryToUnify(otherC);
   } catch (UnificationFailedException ex) {
     return false;
   }
   return true;
 }