Method to find entry by period. Period start, period end and object key
are used to identify each entry.

@param entry the calendar entry
@return appropriate entry, or null if not found
483359
private TreeEntry<E> getEntry(Entry<?> entry) {
        TreeEntry<E> t = root;
        while (t != null) {
            int cmp = compareLongs(getLow(entry), t.low);
            if (cmp == 0)
                cmp = compareLongs(getHigh(entry), t.high);
            if (cmp == 0)
                cmp = entry.hashCode() - t.value.hashCode();

            if (cmp < 0) {
                t = t.left;
            } else if (cmp > 0) {
                t = t.right;
            } else {
                return t;
            }
        }

        return null;
    }
145994
def time_entries(self, start_date=None, end_date=None):
        ''''''
        if self.cache['time_entries']: return self.cache['time_entries']
        if not start_date:
            start_date = datetime.date(1900, 1, 1)
        if not end_date:
            end_date = datetime.date.today()
        time_entry_xml = self.bc.list_time_entries(self.id, start_date, end_date)
        time_entries = []
        for entry in ET.fromstring(time_entry_xml).findall("time-entry"):
            time_entries.append(TimeEntry(entry))
        self.cache['time_entries'] = time_entries
        return self.cache['time_entries']
198748
def get_calendar_entries(context, year=None, month=None,
                         template='zinnia/tags/entries_calendar.html'):
    
    if not (year and month):
        day_week_month = (context.get('day') or
                          context.get('week') or
                          context.get('month'))
        publication_date = getattr(context.get('object'),
                                   'publication_date', None)
        if day_week_month:
            current_month = day_week_month
        elif publication_date:
            if settings.USE_TZ:
                publication_date = timezone.localtime(publication_date)
            current_month = publication_date.date()
        else:
            today = timezone.now()
            if settings.USE_TZ:
                today = timezone.localtime(today)
            current_month = today.date()
        current_month = current_month.replace(day=1)
    else:
        current_month = date(year, month, 1)

    dates = list(map(
        lambda x: settings.USE_TZ and timezone.localtime(x).date() or x.date(),
        Entry.published.datetimes('publication_date', 'month')))

    if current_month not in dates:
        dates.append(current_month)
        dates.sort()
    index = dates.index(current_month)

    previous_month = index > 0 and dates[index - 1] or None
    next_month = index != len(dates) - 1 and dates[index + 1] or None
    calendar = Calendar()

    return {'template': template,
            'next_month': next_month,
            'previous_month': previous_month,
            'calendar': calendar.formatmonth(
                current_month.year,
                current_month.month,
                previous_month=previous_month,
                next_month=next_month)}
734927
public int lookupIndex (long entry)
    {
        int ret = map.get(entry);
        if (ret <= 0 && !growthStopped) {
            numEntries++;
            ret = numEntries;
            map.put (entry, ret);
        }
        return ret - 1;	// feature id should be 0-based
    }
947700
public List<Entry> getTopEntries() {
        if (root != null && root.getGroups() != null && root.getGroups().size() == 1) {
            return root.getGroups().get(0).getEntries();
        }
        return new ArrayList<Entry>();
    }
278362
private ChmEntry findEntry(String file) {
        for (ChmEntry entry : entries) {
            if (file.equals(entry.getSourcePath())) {
                return entry;
            }
        }

        return null;
    }
21789
public Entry getEntryByTitle(String title) {
        List<Entry> entries = getEntriesByTitle(title, true);

        if (!entries.isEmpty()) {
            return entries.get(0);
        }

        return null;
    }
910527
public Availability getEntryByDate(Date date)
   {
      Availability result = null;

      for (Availability entry : this)
      {
         DateRange range = entry.getRange();
         int comparisonResult = range.compareTo(date);
         if (comparisonResult >= 0)
         {
            if (comparisonResult == 0)
            {
               result = entry;
               break;
            }
         }
         else
         {
            break;
         }
      }

      return result;
   }
785475
AsteriskQueueEntryImpl getEntry(String channelName)
    {
        synchronized (entries)
        {
            for (AsteriskQueueEntryImpl entry : entries)
            {
                if (entry.getChannel().getName().equals(channelName))
                {
                    return entry;
                }
            }
        }
        return null;
    }
135560
@Override
  final public TraceMethod entry(String returnType, Class clazz, String methodSignature) {
    return null;
  }
1353999
public PeriodConverter getPeriodConverter(Object object) {
        PeriodConverter converter =
            (PeriodConverter)iPeriodConverters.select(object == null ? null : object.getClass());
        if (converter != null) {
            return converter;
        }
        throw new IllegalArgumentException("No period converter found for type: " +
            (object == null ? "null" : object.getClass().getName()));
    }
754180
public StructuredQueryBuilder.Period period(Calendar start, Calendar end) {
    return new TemporalPeriod(DatatypeConverter.printDateTime(start),
      DatatypeConverter.printDateTime(end));
  }
1213144
public int lookupIndex (Object entry)
    {
        if (entry == null)
            throw new IllegalArgumentException ("Can't lookup \"null\" in an Alphabet.");
        int ret = map.get(entry);
        if (ret <= 0 && !growthStopped) {
            numEntries++;
            ret = numEntries;
            map.put(entry, ret);
        }
        return ret;
    }
619441
def where_entry_date(query, datespec):
    
    date, interval, _ = utils.parse_date(datespec)
    start_date, end_date = date.span(interval)

    return orm.select(
        e for e in query if
        e.local_date >= start_date.naive and
        e.local_date <= end_date.naive
    )
480716
public GenericDictionaryEntry parse(String entry) {
        String[] fields = parseLine(entry);

        String surface = fields[0];
        short leftId = Short.parseShort(fields[1]);
        short rightId = Short.parseShort(fields[2]);
        short wordCost = Short.parseShort(fields[3]);

        List<String> pos = new ArrayList<>();
        pos.addAll(Arrays.asList(fields).subList(4, 10));

        List<String> features = new ArrayList<>();
        features.addAll(Arrays.asList(fields).subList(10, fields.length));

        GenericDictionaryEntry dictionaryEntry = new GenericDictionaryEntry.Builder().surface(surface).leftId(leftId)
                        .rightId(rightId).wordCost(wordCost).pos(pos).features(features).build();

        return dictionaryEntry;
    }
291496
public Integer lookup(String entry) {
    if (!data.containsKey(entry)) {
      int oldsize = data.size();
      data.put(entry, data.size() + 1);
      String msg = String.format(
        "new entry: %s (size: %d -> %d)",
        entry, oldsize, data.size()
      );
      if (fileName != null) {
        msg += " " + fileName;
      }
      LOGGER.info(msg);
    }
    return data.get(entry);
  }
726540
private void appendEntry(Map.Entry<String, EDBObjectEntry> entry, StringBuilder builder) {
        if (builder.length() > 2) {
            builder.append(",");
        }
        builder.append(" \"").append(entry.getKey()).append("\"");
        builder.append(" : ").append(entry.getValue());
    }