Gets the {@code DrawableParent} for index.
13476
public DrawableParent getDrawableParentForIndex(int index) {
    Preconditions.checkArgument(index >= 0);
    Preconditions.checkArgument(index < mDrawableParents.length);
    if (mDrawableParents[index] == null) {
      mDrawableParents[index] = createDrawableParentForIndex(index);
    }
    return mDrawableParents[index];
  }
849628
public TreeElement getChild(int index)
    {
        TreeElement childNode = null;
        if (_children == null)
            return null;
        Object child = _children.get(index);
        if (child != null) {
            childNode = (TreeElement) child;
        }
        return childNode;
    }
93602
public int getValue(GeometryIndex index) {
		if (index.hasChild()) {
			return getValue(index.getChild());
		}
		return index.getValue();
	}
370437
public TrieNode getParent() {
    if (0 == index) return null;
    if (null == parent && -1 == depth) {
      synchronized (this) {
        if (null == parent) {
          parent = newNode(trie.parentIndex[index]);
          assert (parent.index < index);
        }
      }
    }
    return parent;
  }
398905
public int getIndex() {
        if (parent != null) {
            for (int i = 0; i < parent.children.size(); i++) {
                if (parent.children.get(i) == this) {
                    return i;
                }
            }
        }
        
        return -1;
    }
701320
public static Drawable getDrawableAttr(Context ctx, @AttrRes int drawableAttrId){
        int[] attrs = new int[] { drawableAttrId /* index 0 */};
        TypedArray ta = ctx.obtainStyledAttributes(attrs);
        Drawable drawable = ta.getDrawable(0);
        ta.recycle();
        return drawable;
    }
163490
@UiThread
    private int getFlatParentPosition(int parentPosition) {
        int parentCount = 0;
        int listItemCount = mFlatItemList.size();
        for (int i = 0; i < listItemCount; i++) {
            if (mFlatItemList.get(i).isParent()) {
                parentCount++;

                if (parentCount > parentPosition) {
                    return i;
                }
            }
        }

        return INVALID_FLAT_POSITION;
    }
249595
public GenericDraweeHierarchyBuilder setPressedStateOverlay(@Nullable Drawable drawable) {
    if (drawable == null) {
      mPressedStateOverlay = null;
    } else {
      StateListDrawable stateListDrawable = new StateListDrawable();
      stateListDrawable.addState(new int[]{android.R.attr.state_pressed}, drawable);
      mPressedStateOverlay = stateListDrawable;
    }
    return this;
  }
574715
private void obtainIcon(@NonNull final TypedArray typedArray) {
        int resourceId =
                typedArray.getResourceId(R.styleable.NavigationPreference_android_icon, -1);

        if (resourceId != -1) {
            Drawable icon = AppCompatResources.getDrawable(getContext(), resourceId);
            setIcon(icon);
        }
    }
1337882
def parent(self, index):
        
        if not index.isValid():
            return QtCore.QModelIndex()

        childItem = index.internalPointer()
        # the only place where the parent item is queried
        parentItem = childItem.getParent()

        if parentItem == self.root:
            return QtCore.QModelIndex()

        return self.createIndex(parentItem.row(), 0, parentItem)
329125
@Override
    public int getIndexForColor(int rgb) {
        int red = (rgb >> 16) & 0xff;
        int green = (rgb >> 8) & 0xff;
        int blue = rgb & 0xff;

        OctTreeNode node = root;

        for (int level = 0; level <= MAX_LEVEL; level++) {
            OctTreeNode child;
            int bit = 0x80 >> level;

            int index = 0;
            if ((red & bit) != 0)
                index += 4;
            if ((green & bit) != 0)
                index += 2;
            if ((blue & bit) != 0)
                index += 1;

            child = node.leaf[index];

            if (child == null)
                return node.index;
            else if (child.isLeaf)
                return child.index;
            else
                node = child;
        }
        LOGGER.fine("getIndexForColor failed");
        return 0;
    }
779030
public Constituent getParent() {
    if (Constituent_Type.featOkTst && ((Constituent_Type)jcasType).casFeat_parent == null)
      jcasType.jcas.throwFeatMissing("parent", "de.julielab.jules.types.Constituent");
    return (Constituent)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Constituent_Type)jcasType).casFeatCode_parent)));}
321089
@Pure
	public P getElementAt(int index) {
		if (index >= 0 && index < this.referenceElementCount) {
			int idx = 0;
			for (final GridCellElement<P> element : this.elements) {
				if (element.isReferenceCell(this)) {
					if (idx == index) {
						return element.get();
					}
					++idx;
				}
			}
		}
		throw new IndexOutOfBoundsException();
	}
52765
public static int indexInParent (Layer layer) {
    GroupLayer parent = layer.parent();
    if (parent == null) return -1;
    for (int ii = parent.children()-1; ii >= 0; ii--) {
      if (parent.childAt(ii) == layer) return ii;
    }
    throw new AssertionError();
  }
1205159
public View getTopParent(View view) {
		final ViewParent viewParent = view.getParent();
		if (viewParent != null
				&& viewParent instanceof android.view.View) {
			return getTopParent((View) viewParent);
		} else {
			return view;
		}
	}
1118340
public Object get(int index)
    {
        if ((index - m_iStartIndex < 0) || (index - m_iStartIndex >= this.size()))
            return null;    // Not in current list
        return super.get(index - m_iStartIndex);
    }
921426
Drawable getDrawableFromResourceUri(Uri uri) throws FileNotFoundException {
        String authority = uri.getAuthority();
        Resources r;
        if (TextUtils.isEmpty(authority)) {
            throw new FileNotFoundException("No authority: " + uri);
        } else {
            try {
                r = mContext.getPackageManager().getResourcesForApplication(authority);
            } catch (NameNotFoundException ex) {
                throw new FileNotFoundException("No package found for authority: " + uri);
            }
        }
        List<String> path = uri.getPathSegments();
        if (path == null) {
            throw new FileNotFoundException("No path: " + uri);
        }
        int len = path.size();
        int id;
        if (len == 1) {
            try {
                id = Integer.parseInt(path.get(0));
            } catch (NumberFormatException e) {
                throw new FileNotFoundException("Single path segment is not a resource ID: " + uri);
            }
        } else if (len == 2) {
            id = r.getIdentifier(path.get(1), path.get(0), authority);
        } else {
            throw new FileNotFoundException("More than two path segments: " + uri);
        }
        if (id == 0) {
            throw new FileNotFoundException("No resource found for: " + uri);
        }
        return r.getDrawable(id);
    }