Returns the first (lowest) key currently in this tree.

@return key
432876
public synchronized TreeEntry<K, V> firstEntry() {
		if (!validState) {
			throw new InvalidStateException();
		}
		final LeafNode<K, V> node = findSideLeafNode(true);
		if (node == null) {
			return null;
		}
		final K key = node.keys[0];
		final V value = node.values[0];
		return ((key == null) ? null : new TreeEntry<K, V>(key, value));
	}
1162868
public Node firstChild() {

		if (currentNode == null)
			return null;

		Node node = getFirstChild(currentNode);

		if (node != null)
			currentNode = node;

		return node;
	}
324519
public function key()
    {
        $key = parent::key();
        if (null !== $this->keyConsumer) {
            $consumeKey = $this->keyConsumer;
            $consumeKey($key);
        }

        return $key;
    }
708244
public T removeFirst() {
        if ( this.firstNode == null ) {
            return null;
        }
        final T node = this.firstNode;
        this.firstNode = node.getNext();
        node.setNext( null );
        if ( this.firstNode != null ) {
            this.firstNode.setPrevious( null );
        } else {
            this.lastNode = null;
        }
        this.size--;
        return node;
    }
1114939
public function key()
    {
        // TODO: Track position internally to avoid repeated info() calls
        if ( ! $this->useIdentifierKeys) {
            $info = $this->riakCursor->info();

            return isset($info['at']) ? $info['at'] : null;
        }

        return $this->riakCursor->key();
    }
1174721
public function firstKey()
    {
        $keys = AccessHelper::collectionKeys($this->data);

        if (empty($keys)) {
            return null;
        }

        return $keys[0];
    }
39253
public T first() {
        Iterator<T> iterator = iterator();
        return (iterator.hasNext() ? iterator.next() : null);
    }
952297
@Override
    public Entry<K, V> lowerEntry(K key)
    {
        Entry<K, V> entry = entry(key, null);
        return entrySet.lower(entry);
    }
1192818
protected function first()
    {
        foreach ($this->sortable as $key => $value) {
            if (is_numeric($key)) {
                return $value;
            }

            return $key;
        }

        return null;
    }
1025937
public function getFirst()
    {
        $first = null;

        if (count($this->objects) > 0) {
            $first = reset($this->objects);
        }

        return $first;
    }
290126
public List<T> descendingKeys() {
        List<T> list = new ArrayList<T>(map.keySet());

        sort(list, new Comparator<T>() {
            @Override
            public int compare(T o1, T o2) {
                MutableLong l1 = map.get(o1);
                MutableLong l2 = map.get(o2);
                return compare(l2.value, l1.value);
            }

            private int compare(long x, long y) {
                return (x < y) ? -1 : ((x == y) ? 0 : 1);
            }
        });

        return list;
    }
680955
public Entry getFirst()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "getFirst");

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "getFirst", first);

    return first;
  }
824270
protected function getFirstAvailable()
    {
        if ($this->methods) {
            reset($this->methods);
            return key($this->methods);
        }
        return null;
    }
1222813
public synchronized K lastKey() {
		if (!validState) {
			throw new InvalidStateException();
		}
		final LeafNode<K, V> node = findSideLeafNode(false);
		if (node == null) {
			return null;
		}
		return node.keys[node.allocated - 1];
	}
985313
public K getCurrentKey()
    {
        lock.lock();
        try
        {
            Thread currentThread = Thread.currentThread();
            for (Entry<K,Thread> entry : threadMap.entrySet())
            {
                if (currentThread.equals(entry.getValue()))
                {
                    return entry.getKey();
                }
            }
            return null;
        }
        finally
        {
            lock.unlock();
        }
    }
1219114
public function key()
    {
        // TODO: Track position internally to avoid repeated info() calls
        if ( ! $this->useIdentifierKeys) {
            $info = $this->mongoCursor->info();

            return isset($info['at']) ? $info['at'] : null;
        }

        return $this->mongoCursor->key();
    }
1302110
protected function getIteratorFilterKey()
	{
		if ($this->_itf == null)
		{
			$itf = new IteratorFilter();
		}
		else
		{
			$itf = $this->_itf;
		}

		$arValueId = explode("|", $this->_valueId);
		$i = 0;
		foreach ($this->_keyIndex as $keyIndex)
		{
			$itf->addRelation($this->_fields[$keyIndex]->fieldName,  Relation::EQUAL, $arValueId[$i++]);
		}
		return $itf;
	}