com.hp.hpl.jena.sparql.core
Class BasicPattern

java.lang.Object
  extended by com.hp.hpl.jena.sparql.core.BasicPattern
All Implemented Interfaces:
Iterable<com.hp.hpl.jena.graph.Triple>

public class BasicPattern
extends Object
implements Iterable<com.hp.hpl.jena.graph.Triple>

A class whose purpose is to give a name to a collection of triples. Reduces the use of bland "List" in APIs (Java 1.4)


Constructor Summary
BasicPattern()
           
BasicPattern(BasicPattern other)
           
 
Method Summary
 void add(int i, com.hp.hpl.jena.graph.Triple t)
           
 void add(com.hp.hpl.jena.graph.Triple t)
           
 void addAll(BasicPattern other)
           
 boolean equals(Object other)
           
 boolean equiv(BasicPattern other, NodeIsomorphismMap isoMap)
           
 com.hp.hpl.jena.graph.Triple get(int i)
           
 List<com.hp.hpl.jena.graph.Triple> getList()
           
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<com.hp.hpl.jena.graph.Triple> iterator()
           
 int size()
           
 String toString()
           
static BasicPattern wrap(List<com.hp.hpl.jena.graph.Triple> triples)
          Wrap a list of triples up as a BasicPattern.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicPattern

public BasicPattern()

BasicPattern

public BasicPattern(BasicPattern other)
Method Detail

wrap

public static BasicPattern wrap(List<com.hp.hpl.jena.graph.Triple> triples)
Wrap a list of triples up as a BasicPattern. Chnaging the list, changes the BasicPattern


add

public void add(com.hp.hpl.jena.graph.Triple t)

addAll

public void addAll(BasicPattern other)

add

public void add(int i,
                com.hp.hpl.jena.graph.Triple t)

get

public com.hp.hpl.jena.graph.Triple get(int i)

iterator

public Iterator<com.hp.hpl.jena.graph.Triple> iterator()
Specified by:
iterator in interface Iterable<com.hp.hpl.jena.graph.Triple>

size

public int size()

isEmpty

public boolean isEmpty()

getList

public List<com.hp.hpl.jena.graph.Triple> getList()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

equiv

public boolean equiv(BasicPattern other,
                     NodeIsomorphismMap isoMap)

toString

public String toString()
Overrides:
toString in class Object


Licenced under the Apache License, Version 2.0