Package de.susebox.jtopas

Examples of de.susebox.jtopas.TokenizerProperty


   */
  private void removeProperties(int propertyType) {
    Iterator iter = _properties.getProperties();

    while (iter.hasNext()) {
      TokenizerProperty prop = (TokenizerProperty)iter.next();
     
      if (prop.getType() == propertyType) {
        iter.remove();
      }
    }
  }
View Full Code Here


   * @throws  NullPointerException  if no {@link DataProvider} is given
   */
  public TokenizerProperty startsWithSequenceCommentOrString(DataProvider dataProvider)
    throws NullPointerException
  {
    TokenizerProperty prop = null;
   
    if (_properties != null) {
      String data = dataProvider.toString();

      prop = getLongestMatch(data, _properties.getSpecialSequences(), prop);
View Full Code Here

   * @return  the maximum length of the {@link TokenizerProperty} images in the
   *          iterator
   */
  private int getSequenceMaxLength(Iterator iter, int currentMax) {
    while (iter.hasNext()) {
      TokenizerProperty prop = (TokenizerProperty)iter.next();
      int               len  = prop.getImages()[0].length();

      if (len > currentMax) {
        currentMax = len;
      }
    }
View Full Code Here

    Iterator          iter,
    TokenizerProperty currentMatch
  )
  {
    int               currentMax = (currentMatch != null) ? currentMatch.getImages()[0].length() : 0;
    TokenizerProperty retProp    = currentMatch;
   
    while (iter.hasNext()) {
      TokenizerProperty prop = (TokenizerProperty)iter.next();
      int               len  = prop.getImages()[0].length();

      if (len > currentMax) {
        currentMax = len;
        retProp    = prop;
      }
View Full Code Here

      int           len       = dataProvider.getLength();
      char          startChar = getStartChar(dataProvider.getCharAt(0));
      PropertyList  list      = getList(startChar);

      while (list != null) {
        TokenizerProperty prop      = list._property;
        String            image     = prop.getImages()[0];
        int               imageLen  = image.length();

        // compare only if the enough data is available
        if (_useExactLength && imageLen < len) {
          break;            // dont check shorter properties
View Full Code Here

    char          startChar = getStartChar(image.charAt(0));
    PropertyList  list      = getList(startChar);
    PropertyList  prev      = null;
   
    while (list != null) {
      TokenizerProperty prop  = list._property;
      String            img   = prop.getImages()[0];
      int               res   = compare(img, image, 1);

      if (res == 0) {
        if (removeIt) {
          if (prev != null) {
View Full Code Here

  private TokenizerProperty putIntoList(PropertyList list, TokenizerProperty property) {
    String        newImage = property.getImages()[0];
    PropertyList  prev;

    do {
      TokenizerProperty prop  = list._property;
      String            image = prop.getImages()[0];
      int               res   = compare(image, newImage, 1);

      if (res == 0) {
        list._property = property;
        return prop;
View Full Code Here

      if (_currentElem == null) {
        throw new IllegalStateException();
      }

      // remove current element
      TokenizerProperty prop  = _currentElem._property;

      _currentElem = null;
      _parent.searchString(prop.getImages()[0], true);
    }
View Full Code Here

TOP

Related Classes of de.susebox.jtopas.TokenizerProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.