Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the following get(1) function do?

Tags:

android

uri.getPathSegments().get(1);

Basically the get(1) part

like image 304
Sayem Siam Avatar asked Nov 22 '11 17:11

Sayem Siam


People also ask

What is a 1 function?

In Maths, an injective function or injection or one-one function is a function that comprises individuality that never maps discrete elements of its domain to the equivalent element of its codomain. We can say, every element of the codomain is the image of only one element of its domain.

What is an example of a 1 to 1 function?

One to one function is a special function that maps every element of the range to exactly one element of its domain i.e, the outputs never repeat. As an example, the function g(x) = x - 4 is a one to one function since it produces a different answer for every input.

What does a function being 1 1 mean?

A function f is 1 -to- 1 if no two elements in the domain of f correspond to the same element in the range of f . In other words, each x in the domain has exactly one image in the range.

How do I determine if a function is one-to-one?

The horizontal line test can be used to determine if a function is one-to-one given a graph. Simply superimpose a horizontal line onto a graph and see if it intersects the graph at more than one point. If it does, the graph is not one-to-one and if it only intersects at one point, it will be one-to-one.


1 Answers

That will return you the path segment with index '1'.

By that, I mean, If you have content://com.myapp/first/second/third/ It will return 'second'. get(2) will return 'third' and so on...

like image 92
MrZander Avatar answered Sep 28 '22 12:09

MrZander