Returns the element within this container that was hit,
 @return [Element, nil] The element hit, otherwise nil.
342535
def hit_element(x, y)
      @children.reverse_each do |child|
        case child
        when Container, Composite
          if element = child.hit_element(x, y)
            return element
          end
        else
          return child if child.hit?(x, y)
        end
      end

      self if hit?(x, y)
    end
1282432
public Element<T> getElement( int index , boolean fromFront ) {
		if( index > size || index < 0 ) {
			throw new IllegalArgumentException("index is out of bounds");
		}
		if( fromFront ) {
			Element<T> e = first;
			for( int i = 0; i < index; i++ ) {
				e = e.next;
			}
			return e;
		} else {
			Element<T> e = last;
			for( int i = 0; i < index; i++ ) {
				e = e.previous;
			}
			return e;
		}
	}
696776
def retrieve_page(rurl = nil)
      durl = rurl || url
      return nil unless durl
      durl = filter_url(durl) if self.respond_to?(:filter_url)
      self.class.retrieve_session ||= WebPageParser::HTTP::Session.new
      encode(self.class.retrieve_session.get(durl))
    end
911324
def _element_get_id(self, element):
        
        if self._reader._level > 1:
            entry_id = element.get('id')
        else:
            entry_id = element.get('name')
        return entry_id
838809
def get( index )
      raise "Only positive indexes, #{index}" if index < 0
      if index >= data_length
        return nil unless next_list
        return next_list.get( index - data_length)
      else
        ret = nil
        if(index < get_length)
          ret = get_internal_word(index + self.class.type_length )
        end
        return ret
      end
    end
897814
def traverse(node=nil, &block)
      return self.to_enum unless block_given?
      node_stack = [node || self]
      until node_stack.empty?
        current = node_stack.shift
        if current
          yield current
          node_stack = node_stack.insert(0, *current.nodes) if current.respond_to?(:nodes)
        end
      end
      node || self if block_given?
    end
18717
def get_tag(name)
      tag = nil
      name = name.to_s.downcase
      @tag_name_pairs_cache ||= Hash.new
      return @tag_name_pairs_cache[name] unless @tag_name_pairs_cache[name].nil?
      @elements.each_value do |element|
        next unless element.name.downcase == name
        tag = element.tag
        break
      end
      @tag_name_pairs_cache[name]=tag
      return tag
    end
517073
@Override
    public T element() {
        T retrievedElement = peek();

        if (retrievedElement == null) {
            throw new NoSuchElementException();
        }

        return retrievedElement;
    }
862025
def _get keys
      keys.inject hashy do | partial_hash, key_element |
        raise KeyError, keys.join('.') unless Hash === partial_hash
        partial_hash.fetch key_element
      end
    end
640790
def get(key)
      return nil if !@actions.has_key?(key)
      return @results_cache[key] if @results_cache.has_key?(key)
      @results_cache[key] = @actions[key].call
    end
242024
def get_attributes(element)
      attribute_hash = {}
      attributes = element.attributes
      for i in 0...attributes.length
         attribute_hash[attributes.item(i).name] =  attributes.item(i).value
       end
      attribute_hash
    end
304107
def get_elements(path)
      elements = self./(path)
      return unless elements
      elements = elements.map{|element| Element.new(element)}
    end
839365
def get_object(ns, element_name, ext_class)
      elements = getlist(ns, element_name)
      return nil if elements.empty?
      ext_class.new(:namespace => ns, :elem => elements.first)
    end
1277507
function() {
      var elt = this.$input[0],
          container = this.$container[0];
      while(elt && elt.parentNode !== container)
        elt = elt.parentNode;

      return $(elt);
    }
1287480
def _elements(self):
        
        if not hasattr(self, '_elements_cached'):
            setattr(self, '_elements_cached', list(self._select()))
        return self._elements_cached
1190097
def parse_element(ele)
      if ele.is_a? Nokogiri::XML::Text
        return "#{ele.text}\n"
      else
        if (children = ele.children).count > 0
          return wrap_node(ele,children.map {|ele| parse_element(ele)}.join )
        else
          return wrap_node(ele,ele.text)
        end
      end
    end
1169147
def at(index)
      raise Erlang::ImproperListError if improper?
      index += size if index < 0
      return nil if index < 0
      node = self
      while index > 0
        node = node.tail
        index -= 1
      end
      return node.head
    end