public final class TripleID extends Object implements Comparable<TripleID>, Serializable
| Constructor and Description |
|---|
TripleID()
Basic constructor
|
TripleID(long subject,
long predicate,
long object)
Constructor
|
TripleID(TripleID other)
Build a TripleID as a copy of another one.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assign(TripleID replacement) |
void |
clear()
Set all components to zero.
|
int |
compareTo(TripleID other)
Compare TripleID to another one using SPO Order.
|
boolean |
equals(Object o) |
boolean |
equals(TripleID other) |
long |
getObject() |
String |
getPatternString()
Get the pattern of the triple as String, such as "SP?".
|
long |
getPredicate() |
long |
getSubject() |
int |
hashCode() |
boolean |
isEmpty()
Check whether all the components of the triple are empty (zero).
|
boolean |
isNoMatch()
Checks whether any of the components of the triple are "no match" (-1).
|
boolean |
isValid()
Check whether none of the components of the triple are empty.
|
boolean |
match(TripleID pattern)
Check whether this triple matches a pattern of TripleID.
|
void |
setAll(long subject,
long predicate,
long object)
Replace all components of a TripleID at once.
|
void |
setObject(long object) |
void |
setPredicate(long predicate) |
void |
setSubject(long subject) |
static int |
size()
size of one TripleID in memory
|
String |
toString() |
public TripleID()
public TripleID(long subject,
long predicate,
long object)
subject - The subjectpredicate - The predicateobject - The objectpublic TripleID(TripleID other)
other - public long getSubject()
public void setSubject(long subject)
subject - the subject to setpublic long getObject()
public void setObject(long object)
object - the object to setpublic long getPredicate()
public void setPredicate(long predicate)
predicate - the predicate to setpublic void setAll(long subject,
long predicate,
long object)
subject - predicate - object - public void assign(TripleID replacement)
public void clear()
public boolean equals(TripleID other)
public int compareTo(TripleID other)
compareTo in interface Comparable<TripleID>public boolean match(TripleID pattern)
pattern - The pattern to match againstpublic boolean isEmpty()
public boolean isValid()
public boolean isNoMatch()
public String getPatternString()
public static int size()
Copyright © 2020 DataWeb Research. All rights reserved.