code: 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;
      }
docs: 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