Android 中 setTitle 方法的解释

Explanation of setTitle method in Android

我有一个 FragmentActivity,其中有一个 ViewPager,我的问题是:
setTitle(int index) 方法从何而来?

mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {

    @Override
    public void onPageScrollStateChanged(int state) {

    };
    @Override
    public void onPageScrolled(int pos, float posOffset, int a) {{

    };
    @Override
    public void onPageSelected(int pos) {
        String title = Integer.toString(pos);
        setTitle(title); // where are you coming from?
    }
});

方法来自activity.

https://developer.android.com/reference/android/app/Activity.html#setTitle(java.lang.CharSequence)

来自周边(未列出)FragmentActivityFragmentActivity 继承自 Activity。有关详细信息,请参阅 API-FragmentActivity and Activity 的文档。