Class TripletImpl<V,E>
java.lang.Object
org.aksw.commons.util.triplet.TripletImpl<V,E>
- All Implemented Interfaces:
Triplet<V,E>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <V,E> Triplet <V, E> create(V s, E e, V o, boolean reverse) booleanstatic intgetDirection(Triplet<?, ?> triplet, Object node) Returns a bit mask: index: 1 0 [bwdBit] [fwdBit] The first bit indicates whether the subject was equal to the given node, the second bit whether the object was equal to the given node.getDirections(Triplet<?, ?> triplet, Object node) Return a list of indices based on whether the given node is equal to the triple's subject and/or object.static <V> Vstatic <V> Vstatic <V> VinthashCode()makeDirected(Triplet<V, E> in, V source) static <V,E> Triplet <V, E> makeUndirected(Triplet<V, Directed<E>> in) toString()
-
Field Details
-
subject
-
predicate
-
object
-
-
Constructor Details
-
TripletImpl
-
-
Method Details
-
makeDirected
-
makeUndirected
-
create
-
getSource
-
getTarget
-
getTarget
-
getDirections
-
getDirection
Returns a bit mask: index: 1 0 [bwdBit] [fwdBit] The first bit indicates whether the subject was equal to the given node, the second bit whether the object was equal to the given node. Possible values are therefore 0 (no match), 3 (both subject and object matched) or 1 and 2.- Parameters:
triplet-node-- Returns:
-
getSubject
- Specified by:
getSubjectin interfaceTriplet<V,E>
-
getPredicate
- Specified by:
getPredicatein interfaceTriplet<V,E>
-
getObject
-
hashCode
-
equals
-
toString
-