Initialize a new `Item` element.

@param {String} jid
@param {String} node
@param {String} name
@api public
485502
function Item(jid, node, name) {
  Element.call(this, 'item', 'http://jabber.org/protocol/disco#items');
  this.jid = jid;
  this.node = node;
  this.displayName = name;
}
1338002
def initialize_element(elem, element_id)
      if elem.is_a?(Class) && elem < TreeLayout
        layout = elem.new
        elem = layout.view
      elsif elem.is_a?(Class)
        elem = elem.new
      elsif elem.is_a?(TreeLayout)
        layout = elem
        elem = elem.view
      end

      if layout
        if element_id
          name_element(layout, element_id)
        end
        @child_layouts << layout
      elsif element_id
        name_element(elem, element_id)
      end

      return elem
    end
1358332
function EventEmitter(name, node) {
        if ('string' !== typeof name) {
            throw new TypeError('EventEmitter constructor: name must be ' +
                                'string. Found: ' + name);
        }

        this.node = node;

        // ## Public properties

        this.name = name;

        /**
         * ### EventEmitter.listeners
         *
         * Event listeners collection
         */
        this.events = {};

        /**
         * ## EventEmitter.recordChanges
         *
         * If TRUE, keeps tracks of addition and deletion of listeners
         *
         * @see EventEmitter.changes
         */
        this.recordChanges = false;

        /**
         * ## EventEmitter.changes
         *
         * If TRUE, keeps tracks of addition and deletion of listeners
         *
         * @see EventEmitter.recordChanges
         */
        this.changes = {
            added: [],
            removed: []
        };

        /**
         * ## EventEmitter.labels
         *
         * List of labels associated to an event listener
         *
         * @see EventEmitter.on
         */
        this.labels = {};

        /**
         * ### EventEmitter.history
         *
         * Database of emitted events
         *
         * @experimental
         *
         * @see NDDB
         * @see EventEmitter.EventHistory
         * @see EventEmitter.store
         */
        this.history = new EventHistory(this.node);
    }
738157
function component(color, name) {
  utils.assertColor(color, 'color');
  utils.assertString(name, 'name');
  var name = name.string
    , unit = unitMap[name]
    , type = typeMap[name]
    , name = componentMap[name];
  if (!name) throw new Error('invalid color component "' + name + '"');
  return new nodes.Unit(color[type][name], unit);
}
1327091
def create_item(self, name):
        
        elem = self.controlled_list.create_item(name)
        if elem:
            return TodoElementUX(parent=self, controlled_element=elem)
964844
void processSpecialNodeTypes(NodeWithType<?, Type> node, String name) {
        Type type = node.getType();
        if (node instanceof MethodDeclaration && ("newBufferAndOffset".equals(name) || "nextArrayOffset".equals(name))) {
            node.setType(PrimitiveType.intType());
        } else if (PrimitiveType.longType().equals(type)) {
            switch(name) {
            case "offset":
            case "offsetInNew":
            case "offsetInOld":
            case "lookAheadElementOffset":
                node.setType(PrimitiveType.intType());
            }
        } else if (isRefType(type, "LinkedQueueNode")) {
            node.setType(simpleParametricType("LinkedQueueAtomicNode", "E"));
        } else if (isRefArray(type, "E")) {
            node.setType(atomicRefArrayType((ArrayType) type));
        }
    }
274976
function XmlNode(name, children) {
    if (children === void 0) { children = []; }
    this.name = name;
    this.children = children;
    this.attributes = {};
}
392605
private static void initializeNode(Element node) {
        node.attr(CONTENT_SCORE, Integer.toString(0));

        String tagName = node.tagName();
        if ("div".equalsIgnoreCase(tagName)) {
            incrementContentScore(node, 5);
        } else if ("pre".equalsIgnoreCase(tagName)
                || "td".equalsIgnoreCase(tagName)
                || "blockquote".equalsIgnoreCase(tagName)) {
            incrementContentScore(node, 3);
        } else if ("address".equalsIgnoreCase(tagName)
                || "ol".equalsIgnoreCase(tagName)
                || "ul".equalsIgnoreCase(tagName)
                || "dl".equalsIgnoreCase(tagName)
                || "dd".equalsIgnoreCase(tagName)
                || "dt".equalsIgnoreCase(tagName)
                || "li".equalsIgnoreCase(tagName)
                || "form".equalsIgnoreCase(tagName)) {
            incrementContentScore(node, -3);
        } else if ("h1".equalsIgnoreCase(tagName)
                || "h2".equalsIgnoreCase(tagName)
                || "h3".equalsIgnoreCase(tagName)
                || "h4".equalsIgnoreCase(tagName)
                || "h5".equalsIgnoreCase(tagName)
                || "h6".equalsIgnoreCase(tagName)
                || "th".equalsIgnoreCase(tagName)) {
            incrementContentScore(node, -5);
        }

        incrementContentScore(node, getClassWeight(node));
    }
1315630
function (data){
    
        //create a new item object, place data in
        var node = { 
                data: data, 
                next: null,
                prev: null
            };
    
        //special case: no items in the list yet
        if (this._length == 0) {
            this._head = node;
            this._tail = node;
        } else {
        
            //attach to the tail node
            this._tail.next = node;
            node.prev = this._tail;
            this._tail = node;
        }        
        
        //don't forget to update the count
        this._length++;
    
    }
897192
function Slot(name, elementId) {
  if (this.init_) {
    this.init_();
  }
  this.name = name;
  this.elementId = elementId;
  this.bidProviders = [];
  this.sizes = [];
}
518268
static <E> Node<E> newNode(E item) {
        Node<E> node = new Node<E>();
        U.putObject(node, ITEM, item);
        return node;
    }
1206588
function(node) {
            var instance = this,
                pjaxselectionCont = Y.one('.pjaxselection'),
                pjaxselectionButtons = pjaxselectionCont.all('button');

            pjaxselectionCont.delegate(
                'click',
                function(e) {
                    var btn = e.currentTarget,
                        pjaxtype;
                    pjaxselectionButtons.removeClass(PURE_BUTTON_ACTIVE);
                    btn.addClass(PURE_BUTTON_ACTIVE);
                    pjaxtype = btn.getAttribute('data-pjaxtype');
                    switch (pjaxtype) {
                        case '0':
                            instance.switchAttribute(false);
                        break;
                        case '1':
                            instance.switchAttribute(true);
                            instance.allAnchor.removeAttribute('data-pjax-cache');
                        break;
                        case '2':
                            instance.switchAttribute(true);
                            instance.allAnchor.setAttribute('data-pjax-cache', true);
                        break;
                    }
                    Y.soon(Y.bind(instance.refreshCodedescription, instance));
                },
                'button'
            );
        }
224747
function init(schema, name) {  // {{{2
/**
 * Kind constructor
 *
 * @param schema {Object|String} Schema containing the kind
 * @param name {String} Unique kind name within the schema
 *
 * @method constructor
 */

  this.name = name;  // {{{3
  /**
   * Kind name unique within a schema
   *
   * @property name
   * @type String
   */


  this.schema = typeof schema === 'string' ?  // {{{3
    O.data.schemas[schema] :
    schema
  ;
  /**
   * Schema to which the kind is assigned
   *
   * @property schema
   * @type Object
   */

  if (! this.schema) {
    throw O.log.error('Missing schema', schema);
  }

  if (this.name in this.schema.kinds) {
    throw O.log.error(this.schema, 'Duplicit kind', this.name);
  }

  this.schema.kinds[this.name] = this;

  // }}}3

//  O.callChain(this, 'init')();

//  console.log('KIND INIT', this.schema.name, this.name);
}
999924
private void initHeadTail(Node<E> h, Node<E> t) {
        if (h == t) {
            if (h == null)
                h = t = new Node<>(null);
            else {
                // Avoid edge case of a single Node with non-null item.
                Node<E> newNode = new Node<>(null);
                t.lazySetNext(newNode);
                newNode.lazySetPrev(t);
                t = newNode;
            }
        }
        head = h;
        tail = t;
    }
1268640
function (referenceNode, newElement, position) {
        if (!(referenceNode instanceof HTMLElement) || !(referenceNode.parentElement instanceof HTMLElement)) {
            throw new Error('target and element must be a node');
        }
        referenceNode.parentElement.insertBefore(newElement, (position === 'before' ? referenceNode : referenceNode.nextElementSibling));
    }
716824
public Node createChild(final String name) throws IllegalArgumentException {
        // Precondition checks
        if (name == null || name.trim().length() == 0) {
            throw new IllegalArgumentException("name must be specified");
        }

        // Create
        return createChild(Patterns.from(name));
    }
829413
def StartElement(self, name, attributes):
        '''
        
        '''
        if name == 'hierarchy':
            pass
        elif name == 'node':
            # Instantiate an Element object
            attributes['uniqueId'] = 'id/no_id/%d' % self.idCount
            bounds = re.split('[\][,]', attributes['bounds'])
            attributes['bounds'] = ((int(bounds[1]), int(bounds[2])), (int(bounds[4]), int(bounds[5])))
            if DEBUG_BOUNDS:
                print >> sys.stderr, "bounds=", attributes['bounds']
            self.idCount += 1
            child = View.factory(attributes, self.device, version=self.version, uiAutomatorHelper=self.uiAutomatorHelper)
            self.views.append(child)
            # Push element onto the stack and make it a child of parent
            if not self.nodeStack:
                self.root = child
            else:
                self.parent = self.nodeStack[-1]
                self.parent.add(child)
            self.nodeStack.append(child)