Constructor and Description |
---|
TripleImpl(NonLiteral subject,
UriRef predicate,
Resource object)
Creates a new
TripleImpl . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Resource |
getObject() |
UriRef |
getPredicate() |
NonLiteral |
getSubject() |
int |
hashCode()
The hash code is computed as follow
(subject.hashCode() >> 1) ^ predicate.hashCode() ^ object.hashCode() << 1)
Note that the hash returned is computed including the hash of BNodes, so
it is not blank-node blind as in Graph.
|
String |
toString() |
public TripleImpl(NonLiteral subject, UriRef predicate, Resource object)
TripleImpl
.subject
- the subject.predicate
- the predicate.object
- the object.IllegalArgumentException
- if an attribute is null
.public boolean equals(Object obj)
public int hashCode()
Triple
public NonLiteral getSubject()
getSubject
in interface Triple
public UriRef getPredicate()
getPredicate
in interface Triple
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.