Java boolean return if statement

Can someone please explain, in simple English, the logic behind this statement?

return mContainsLoadingRow ? (getContentDataSize() + 1) : getContentDataSize();

Assuming mContainsLoadingRow is a boolean, if mContainsLoadingRow is true, then return getContentDataSize() + 1? If not, return getContentDataSize()? Is that the correct way to look at this?

Source: java

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.