[jsword-devel] Method to find if BibleBook is contained in a Book

DM Smith dmsmith at crosswire.org
Tue Mar 11 05:15:22 MST 2014


We haven't pushed this down into JSword. So far it is the responsibility of the front-end. Chris B has made it efficient to ask a Book whether it contains a Verse.

Essentially, when it comes to asking a module if it has meaningful content, you want containsAny(Key verses, boolean includeIntros) and containsAny(Key verses) { return containsAny(verses, false); }

I think it should ignore verse 0 by default. If it doesn't have verse content, then does the content really mean something?

As you have noted contains(Key) is confusing. There are a few places where it means containsAny. Usually it means containAll. The name, contains, was chosen early as we derived from a container class where the argument was an element of the container.  That is, contains is supposed to mean isMemberOf. Later we changed the inheritance as it wasn't an "is a" relationship.

But we need to be careful of not introducing more confusion.

By the way, the list serve was holding mail for a few days.

In Him,
	DM

On Mar 8, 2014, at 5:26 PM, Martin Denham <mjdenham at gmail.com> wrote:

> Is there an efficient way to find if a BibleBook is contained in a Book (Bible or commentary) using JSword?
> 
> I recall this subject being discussed but can't recall the outcome.
> 
> Thanks
> Martin
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20140311/3d013bc4/attachment.p7s>


More information about the jsword-devel mailing list