/**
  * Tests if elements contained in a Stack <code>stack</code> is valid for the <code>TextTransition
  * </code>. This mehtod is supposed to be used internally by the Relaxer system.
  *
  * @param stack
  * @return boolean
  */
 public static boolean isMatch(RStack stack) {
   Element element = stack.peekElement();
   if (element == null) {
     return (false);
   }
   return (isMatch(element));
 }
 /**
  * Tests if elements contained in a Stack <code>stack</code> is valid for the <code>TextTransition
  * </code>. This method consumes the stack contents during matching operation. This mehtod is
  * supposed to be used internally by the Relaxer system.
  *
  * @param stack
  * @return boolean
  */
 public static boolean isMatchHungry(RStack stack) {
   Element element = stack.peekElement();
   if (element == null) {
     return (false);
   }
   if (isMatch(element)) {
     stack.popElement();
     return (true);
   } else {
     return (false);
   }
 }
Exemplo n.º 3
0
 /**
  * Tests if elements contained in a Stack <code>stack</code> is valid for the <code>XParamList
  * </code>. This method consumes the stack contents during matching operation. This mehtod is
  * supposed to be used internally by the Relaxer system.
  *
  * @param stack
  * @return boolean
  */
 public static boolean isMatchHungry(RStack stack) {
   RStack target = stack;
   boolean $match$ = false;
   Element element = stack.peekElement();
   IGlyphFactory factory = GlyphFactory.getFactory();
   Element child;
   while (true) {
     if (!XParamListParam.isMatchHungry(target)) {
       break;
     }
     $match$ = true;
   }
   return ($match$);
 }