Package org.eclipse.rdf4j.query.impl
Class SimpleBinding
- java.lang.Object
-
- org.eclipse.rdf4j.query.impl.SimpleBinding
-
- All Implemented Interfaces:
java.io.Serializable
,Binding
- Direct Known Subclasses:
BindingImpl
public class SimpleBinding extends java.lang.Object implements Binding
An implementation of theBinding
interface.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
private static long
serialVersionUID
private Value
value
-
Constructor Summary
Constructors Constructor Description SimpleBinding(java.lang.String name, Value value)
Creates a binding object with the supplied name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Compares a binding object to another object.java.lang.String
getName()
Gets the name of the binding (e.g.Value
getValue()
Gets the value of the binding.int
hashCode()
The hash code of a binding is defined as the bit-wise XOR of the hash codes of its name and value:java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
name
private final java.lang.String name
-
value
private final Value value
-
-
Constructor Detail
-
SimpleBinding
public SimpleBinding(java.lang.String name, Value value)
Creates a binding object with the supplied name and value.- Parameters:
name
- The binding's name.value
- The binding's value.
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:Binding
Gets the name of the binding (e.g. the variable name).
-
getValue
public Value getValue()
Description copied from interface:Binding
Gets the value of the binding. The returned value is never equal to null, such a "binding" is considered to be unbound.
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:Binding
Compares a binding object to another object.
-
hashCode
public int hashCode()
Description copied from interface:Binding
The hash code of a binding is defined as the bit-wise XOR of the hash codes of its name and value:name.hashCode() ˆ value.hashCode()
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-