Interface RDFNodeList<E extends org.apache.jena.rdf.model.RDFNode>

Type Parameters:
E - the type of element-nodes in this []-list
All Superinterfaces:
org.apache.jena.graph.FrontsNode, org.apache.jena.rdf.model.RDFNode, org.apache.jena.rdf.model.Resource
All Known Subinterfaces:
OntList<E>
All Known Implementing Classes:
OntListImpl

public interface RDFNodeList<E extends org.apache.jena.rdf.model.RDFNode> extends org.apache.jena.rdf.model.Resource
A parameterized analogue of the Jena RDF []-List that provides read-only access to its items.
See Also:
  • RDFList
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    contains(E element)
    Answers true if the []-list contains the specified element.
    default Optional<E>
    Answers the first element of the type E.
    default boolean
    Answers true if this list contains no elements of the type E.
    default boolean
    Answers true if it is a nil []-list.
    default Optional<E>
    Answers the last element of the type E.
    Lists all elements of the type E from this list.
    default long
    Answers the number of rdf-nodes in the list.

    Methods inherited from interface org.apache.jena.graph.FrontsNode

    asNode

    Methods inherited from interface org.apache.jena.rdf.model.RDFNode

    as, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWith

    Methods inherited from interface org.apache.jena.rdf.model.Resource

    abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
  • Method Details

    • members

      Stream<E> members()
      Lists all elements of the type E from this list. Note: a real RDF-list may contain nodes with an incompatible type, in this case they will not be included in the result Stream. To get all RDF Nodes use the standard list representation: the expression Iter.asStream(this.as(RDFList.class).iterator()) will return a Stream of nodes.
      Returns:
      Stream of E-elements
      See Also:
    • contains

      default boolean contains(E element)
      Answers true if the []-list contains the specified element. More formally, returns true if and only if this RDF-list contains at least one element e of the type E such that element.equals(e).
      Parameters:
      element - E, not null
      Returns:
      boolean
    • first

      default Optional<E> first()
      Answers the first element of the type E.
      Returns:
      Optional around the E-item
    • last

      default Optional<E> last()
      Answers the last element of the type E.
      Returns:
      Optional around the E-item
    • size

      default long size()
      Answers the number of rdf-nodes in the list. Note: in general, this operation is not equivalent to the expression this.members().count(), since the list may contain items of an incompatible type.
      Returns:
      the real size of the []-list as an integer
    • isNil

      default boolean isNil()
      Answers true if it is a nil []-list. Please note: a non-nil list may also not contain elements of the type E and, therefore, be isEmpty() empty.
      Returns:
      boolean
      See Also:
    • isEmpty

      default boolean isEmpty()
      Answers true if this list contains no elements of the type E. A nil-list is always empty, but the reverse is not true.
      Returns:
      boolean
      See Also: