get and return the next time merged date-time word

@param   word
@param   eIdx
@return  IWord
@throws  IOException
779964
protected IWord getNextTimeMergedWord(IWord word, int eIdx) throws IOException
    {
        int pIdx = TimeUtil.getDateTimeIndex(word.getEntity(eIdx));
        if ( pIdx == TimeUtil.DATETIME_NONE ) {
            return null;
        }

        IWord[] wMask = TimeUtil.createDateTimePool();
        TimeUtil.fillDateTimePool(wMask, pIdx, word);

        IWord dWord = null;
        int mergedNum = 0;
        while ( (dWord = super.next()) != null ) {
            String[] entity = dWord.getEntity();
            if ( entity == null ) {
                eWordPool.push(dWord);
                break;
            }

            if ( ArrayUtil.startsWith("time.a", entity) > -1 ) {
            	if ( TimeUtil.DATETIME_NONE ==
                        TimeUtil.fillDateTimePool(wMask, dWord) ) {
                    eWordPool.push(dWord);
                    break;
                }
            } else if ( ArrayUtil.startsWith("datetime.hi", entity) > -1 ) {
                /*
                 * check and merge the date time time part with a style
                 * like 15:45 or 15:45:36 eg...
                */
                TimeUtil.fillTimeToPool(wMask, dWord.getValue());
            } else if ( ArrayUtil.startsWith(Entity.E_DATETIME_P, entity) > -1 ) {
            	int tIdx = TimeUtil.fillDateTimePool(wMask, dWord);
            	if ( tIdx == TimeUtil.DATETIME_NONE || wMask[tIdx-1] == null ) {
                    eWordPool.push(dWord);
                    break;
                }
            } else {
                eWordPool.push(dWord);
                break;
            }

            mergedNum++;
        }

        if ( mergedNum == 0 ) {
            return null;
        }

        buffer.clear();
        for ( int i = 0; i < wMask.length; i++ ) {
            if ( wMask[i] == null ) {
            	continue;
            }

            if ( buffer.length() > 0
            		&& (i+1) < wMask.length ) {
                buffer.append(' ');
            }

            buffer.append(wMask[i].getValue());
        }

        dWord = new Word(buffer.toString(), IWord.T_BASIC_LATIN);
        dWord.setPosition(word.getPosition());
        dWord.setPartSpeech(IWord.TIME_POSPEECH);

        //check and define the entity
        buffer.clear().append("datetime.");
        for ( int i = 0; i < wMask.length; i++ ) {
            if ( wMask[i] == null ) continue;
            buffer.append(TimeUtil.getTimeKey(wMask[i]));
        }

        dWord.setEntity(new String[]{buffer.toString()});

        return dWord;
    }
156149
private final int getIndexFor(String word) {
        Integer index = termToIndex.get(word);
        if (index == null) {     
            synchronized(this) {
                // recheck to see if the term was added while blocking
                index = termToIndex.get(word);
                // if another thread has not already added this word while the
                // current thread was blocking waiting on the lock, then add it.
                if (index == null) {
                    int i = wordIndexCounter++;
                    termToIndex.put(word, i);
                    return i; // avoid the auto-boxing to assign i to index
                }
            }
        }
        return index;
    }
224364
public synchronized XEvent get(int eventIndex) throws IOException,
			IndexOutOfBoundsException {
		// check for index sanity
		if (eventIndex < 0 || eventIndex >= size) {
			throw new IndexOutOfBoundsException();
		}
		// determine and set appropriate file pointer position
		navigateToIndex(eventIndex);
		// read and return requested audit trail entry
		return read();
	}
323110
private static int next_idx( long [] tl ) {
    // Spin until we can CAS-acquire a fresh index
    while( true ) {
      int oldidx = (int)tl[0];
      int newidx = (oldidx+1)&(MAX_EVENTS-1);
      if( CAS( tl, 0, oldidx, newidx ) )
        return oldidx;
    }
  }
1243199
public XEvent get(int index) {
		try {
			XEvent event = events.get(index);
			return event;
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
	}
654150
def get_cluster(self, word):
        
        idx = self.ix(word)
        return self.clusters[idx]
637953
def _insertDateIndex(date, l):
    '''
    
    '''
    return next((i for i, n in enumerate(l) if n[0] < date), len(l))
92892
public static List<Word> split(Word word){
        String value = GENERIC_TRIE.get(word.getText());
        if(value==null){
            return null;
        }
        List<Word> words = new ArrayList<>();
        for(String val : value.split("\\s+")){
            words.add(new Word(val));
        }
        if(words.isEmpty()){
            return null;
        }
        return words;
    }
941349
public Date getDate( int index ) throws OdaException
	{
		java.util.Date value = (java.util.Date) getFieldValue(index);
		return value==null?new Date(0):new Date(value.getTime());
	}
1165303
public synchronized FlatRow getNextMergedRow() throws IOException {
    ResultQueueEntry<FlatRow> queueEntry = getNext();

    switch (queueEntry.getType()) {
    case CompletionMarker:
      lastResponseProcessed = true;
      markerCounter.decrementAndGet();
      break;
    case Data:
      if (startTime != null) {
        getFirstResponseTimer().update(System.nanoTime() - startTime, TimeUnit.NANOSECONDS);
        startTime = null;
      }
      return queueEntry.getResponseOrThrow();
    case Exception:
      markerCounter.decrementAndGet();
      return queueEntry.getResponseOrThrow();
    case RequestResultMarker:
      markerCounter.decrementAndGet();
      if (!completionMarkerFound.get()) {
        requestStream.request(1);
      }
      return getNextMergedRow();
    default:
      throw new IllegalStateException("Cannot process type: " + queueEntry.getType());
    }

    Preconditions.checkState(lastResponseProcessed,
      "Should only exit merge loop with by returning a complete FlatRow or hitting end of stream.");
    return null;
  }
813446
public Date getDate(int columnIndex) {
		Object fieldValue = data[columnIndex];
		if (fieldValue == null) {
			return null;
		}
		if (fieldValue instanceof Date) {
			return (Date) fieldValue;
		}
		throw new DBFException(
				"Unsupported type for Date at column:" + columnIndex + " " + fieldValue.getClass().getCanonicalName());
	}
1139498
public synchronized TemporalDocument next() {
	
	int firstSpace = nextLine.indexOf(" ");
	String timeStr = nextLine.substring(0, firstSpace);
	String doc = nextLine.substring(firstSpace);
	TemporalDocument next = 
	    new TemporalStringDocument(doc, Long.parseLong(timeStr));
	try {
	    nextLine = documentsReader.readLine();
	} catch (Throwable t) {
	    t.printStackTrace();
	    nextLine = null;
	}
	return next;
    }
626096
public AsyncFuture getFutureFromIndex(int theIndex) {
        if (theIndex == READ_FUTURE_INDEX || theIndex == SYNC_READ_FUTURE_INDEX) {
            return this.readFuture;
        }
        if (theIndex == WRITE_FUTURE_INDEX || theIndex == SYNC_WRITE_FUTURE_INDEX) {
            return this.writeFuture;
        }
        return null;
    }
58805
@Override
	public long getDelay(TimeUnit unit) {

		long next = TimeUnit.MILLISECONDS.convert(getDelayToNextExecutionInMillis(), unit);

		logger.info("{} ms until start of task {}", new Object[] { next, name });

		return next;
	}
937191
public int getLongestSuffixLength(String word)
    {
        word = reverse(word);
        LinkedList<Map.Entry<String, Integer>> suffixList = trie.commonPrefixSearchWithValue(word);
        if (suffixList.size() == 0) return 0;
        return suffixList.getLast().getValue();
    }
358335
@Override
  public long getNextIncludedTime (final long nTimeStamp)
  {

    // Call base calendar implementation first
    long timeStamp = nTimeStamp;
    final long baseTime = super.getNextIncludedTime (timeStamp);
    if ((baseTime > 0) && (baseTime > timeStamp))
    {
      timeStamp = baseTime;
    }

    // Get timestamp for 00:00:00
    final Calendar day = getStartOfDayJavaCalendar (timeStamp);
    while (isTimeIncluded (day.getTime ().getTime ()) == false)
    {
      day.add (Calendar.DATE, 1);
    }

    return day.getTime ().getTime ();
  }
1225343
def get_time(self, idx=0):
        
        thetime = super(SingleData, self).get_time(idx=0)
        return thetime