Tabnine Logo
SelectorImpl$PseudoClassImpl.isSameElementType
Code IndexAdd Tabnine to your IDE (free)

How to use
isSameElementType
method
in
cz.vutbr.web.csskit.SelectorImpl$PseudoClassImpl

Best Java code snippets using cz.vutbr.web.csskit.SelectorImpl$PseudoClassImpl.isSameElementType (Showing top 6 results out of 315)

origin: org.daisy.libs/jstyleparser

/**
 * Computes the count of element siblings after the given element in the DOM tree.
 * @param e The element to be examined
 * @param sameType when set to <code>true</code> only the element with the same type are considered.
 *                 Otherwise, all elements are considered.
 * @return the number of following siblings
 */
protected int countSiblingsAfter(Element e, boolean sameType)
{
  int cnt = 0;
  Node next = e;
  do {
    next = next.getNextSibling();
    if (next != null && next.getNodeType() == Node.ELEMENT_NODE)
    {
      if (!sameType || isSameElementType(e, (Element) next))
        cnt++;
    }
  } while (next != null);
  
  return cnt;
}

origin: org.daisy.libs/jstyleparser

/**
 * Computes the count of element siblings before the given element in the DOM tree.
 * @param e The element to be examined
 * @param sameType when set to <code>true</code> only the element with the same type are considered.
 *                 Otherwise, all elements are considered.
 * @return the number of preceding siblings
 */
protected int countSiblingsBefore(Element e, boolean sameType)
{
  int cnt = 0;
  Node prev = e;
  do {
    prev = prev.getPreviousSibling();
    if (prev != null && prev.getNodeType() == Node.ELEMENT_NODE)
    {
      if (!sameType || isSameElementType(e, (Element) prev))
        cnt++;
    }
  } while (prev != null);
  
  return cnt;
}

origin: radkovo/jStyleParser

/**
 * Computes the count of element siblings before the given element in the DOM tree.
 * @param e The element to be examined
 * @param sameType when set to <code>true</code> only the element with the same type are considered.
 *                 Otherwise, all elements are considered.
 * @return the number of preceding siblings
 */
protected int countSiblingsBefore(Element e, boolean sameType)
{
  int cnt = 0;
  Node prev = e;
  do {
    prev = prev.getPreviousSibling();
    if (prev != null && prev.getNodeType() == Node.ELEMENT_NODE)
    {
      if (!sameType || isSameElementType(e, (Element) prev))
        cnt++;
    }
  } while (prev != null);
  
  return cnt;
}

origin: radkovo/jStyleParser

  prev = prev.getPreviousSibling();
  if (prev != null && prev.getNodeType() == Node.ELEMENT_NODE
      && isSameElementType(e, (Element) prev))
    firstt = false;
} while (prev != null && firstt);
  next = next.getNextSibling();
  if (next != null && next.getNodeType() == Node.ELEMENT_NODE
      && isSameElementType(e, (Element) next))
    lastt = false;
} while(next != null && lastt);
origin: org.daisy.libs/jstyleparser

  prev = prev.getPreviousSibling();
  if (prev != null && prev.getNodeType() == Node.ELEMENT_NODE
      && isSameElementType(e, (Element) prev))
    firstt = false;
} while (prev != null && firstt);
  next = next.getNextSibling();
  if (next != null && next.getNodeType() == Node.ELEMENT_NODE
      && isSameElementType(e, (Element) next))
    lastt = false;
} while(next != null && lastt);
origin: radkovo/jStyleParser

/**
 * Computes the count of element siblings after the given element in the DOM tree.
 * @param e The element to be examined
 * @param sameType when set to <code>true</code> only the element with the same type are considered.
 *                 Otherwise, all elements are considered.
 * @return the number of following siblings
 */
protected int countSiblingsAfter(Element e, boolean sameType)
{
  int cnt = 0;
  Node next = e;
  do {
    next = next.getNextSibling();
    if (next != null && next.getNodeType() == Node.ELEMENT_NODE)
    {
      if (!sameType || isSameElementType(e, (Element) next))
        cnt++;
    }
  } while (next != null);
  
  return cnt;
}

cz.vutbr.web.csskitSelectorImpl$PseudoClassImplisSameElementType

Javadoc

Checks whether two elements have the same name.

Popular methods of SelectorImpl$PseudoClassImpl

  • <init>
  • countSiblingsAfter
    Computes the count of element siblings after the given element in the DOM tree.
  • countSiblingsBefore
    Computes the count of element siblings before the given element in the DOM tree.
  • decodeIndex
    Decodes the element index in the an+b form.
  • positionMatches
    Checks whether the element position matches a an+b index specification.

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Reference (javax.naming)
  • JTable (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now