Package hydra.tinkerpop.features
Class Features
- java.lang.Object
-
- hydra.tinkerpop.features.Features
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Features>
public class Features extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Features>
An interface that represents the capabilities of a Graph implementation. By default all methods of features return true and it is up to implementers to disable feature they don't support. Users should check features prior to using various functions of TinkerPop to help ensure code portability across implementations. For example, a common usage would be to check if a graph supports transactions prior to calling the commit method on Graph.tx(). As an additional notice to Graph Providers, feature methods will be used by the test suite to determine which tests will be ignored and which will be executed, therefore proper setting of these features is essential to maximizing the amount of testing performed by the suite. Further note, that these methods may be called by the TinkerPop core code to determine what operations may be appropriately executed which will have impact on features utilized by users.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description EdgeFeaturesedgeGets the features related to edge operation.static NameEDGEName of thehydra.tinkerpop.features.Features.edgefield.GraphFeaturesgraphGets the features related to graph operation.static NameGRAPHName of thehydra.tinkerpop.features.Features.graphfield.static NameTYPE_Name of thehydra.tinkerpop.features.Featurestype.VertexFeaturesvertexGets the features related to vertex operation.static NameVERTEXName of thehydra.tinkerpop.features.Features.vertexfield.
-
Constructor Summary
Constructors Constructor Description Features(EdgeFeatures edge, GraphFeatures graph, VertexFeatures vertex)Constructs an immutableFeatures.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Features other)booleanequals(java.lang.Object other)inthashCode()FeatureswithEdge(EdgeFeatures edge)Returns a copy of thisFeatureswithedgereplaced.FeatureswithGraph(GraphFeatures graph)Returns a copy of thisFeatureswithgraphreplaced.FeatureswithVertex(VertexFeatures vertex)Returns a copy of thisFeatureswithvertexreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.tinkerpop.features.Featurestype.
-
EDGE
public static final Name EDGE
Name of thehydra.tinkerpop.features.Features.edgefield.
-
GRAPH
public static final Name GRAPH
Name of thehydra.tinkerpop.features.Features.graphfield.
-
VERTEX
public static final Name VERTEX
Name of thehydra.tinkerpop.features.Features.vertexfield.
-
edge
public final EdgeFeatures edge
Gets the features related to edge operation.
-
graph
public final GraphFeatures graph
Gets the features related to graph operation.
-
vertex
public final VertexFeatures vertex
Gets the features related to vertex operation.
-
-
Constructor Detail
-
Features
public Features(EdgeFeatures edge, GraphFeatures graph, VertexFeatures vertex)
Constructs an immutableFeatures.- Parameters:
edge- Gets the features related to edge operation.graph- Gets the features related to graph operation.vertex- Gets the features related to vertex operation.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Features other)
- Specified by:
compareToin interfacejava.lang.Comparable<Features>
-
withEdge
public Features withEdge(EdgeFeatures edge)
Returns a copy of thisFeatureswithedgereplaced.
-
withGraph
public Features withGraph(GraphFeatures graph)
Returns a copy of thisFeatureswithgraphreplaced.
-
withVertex
public Features withVertex(VertexFeatures vertex)
Returns a copy of thisFeatureswithvertexreplaced.
-
-