org.openrdf.model
Interface Statement

All Superinterfaces:
Comparable, Serializable
All Known Implementing Classes:
StatementImpl

public interface Statement
extends Comparable, Serializable

An RDF statement.


Method Summary
 boolean equals(Object other)
          Compares a statement object to another object.
 Value getObject()
          Gets the object of this statement.
 URI getPredicate()
          Gets the predicate of this statement.
 Resource getSubject()
          Gets the subject of this statement.
 int hashCode()
          The hash code of a statement is defined as follows: (0xFF0000 & subject.hashCode()) | (0x00FF00 & predicate.hashCode()) | (0x0000FF & object.hashCode());
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getSubject

public Resource getSubject()
Gets the subject of this statement.

Returns:
The statement's subject.

getPredicate

public URI getPredicate()
Gets the predicate of this statement.

Returns:
The statement's predicate.

getObject

public Value getObject()
Gets the object of this statement.

Returns:
The statement's object.

equals

public boolean equals(Object other)
Compares a statement object to another object.

Parameters:
other - The object to compare this statement to.
Returns:
true if the other object is an instance of Statement and if their subjects, predicates and objects are equal.

hashCode

public int hashCode()
The hash code of a statement is defined as follows:
 (0xFF0000 & subject.hashCode()) |
 (0x00FF00 & predicate.hashCode()) |
 (0x0000FF & object.hashCode());
 

Returns:
A hash code for the statement.


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.