Return a reference to a new list cell whose head is value and whose tail is this list.
value
233234235236237238239240241242243
final Resource r = model.createResource(TestList.NS + "foo"); // create a list of foos for (int i = 0; i < 5; i++) { list = list.cons(r); } final int listLen = list.size(); // now append foos to the root list
297298299300301302303304305306307
443444445446447448449450451452453
final Resource r = model.createResource(TestList.NS + "a"); // cons each a's onto the front of the list for (int i = 0; i < 10; i++) { list = list.cons(r); } // now index them back again for (int j = 0; j < 10; j++) {
598599600601602603604605606607608
final Resource r2 = model.createResource(TestList.NS + "z"); for (int i = 0; i < 10; i++) { list0 = list0.cons(r0); list1 = list1.cons(r1); } // delete the elements of list0 one at a time while (!list0.isEmpty()) {
407408409410411412413414415416417
* @return {@link OntClass} instance. */ public OntClass createUnionClass(List<Resource> classes) { RDFList list = ontModel.createList(); for (Resource klass : classes) { list.cons(klass); } return createUnionClass(list); } /**