Interface OpaqueObject<T extends OpaqueObject<T>>
- Type Parameters:
T
- Generated interface
- All Superinterfaces:
BindingContract<OpaqueObject<T>>
,BindingObject
,ValueAware<OpaqueData<?>>
- All Known Implementing Classes:
AbstractOpaqueObject
,CodecOpaqueObject
public non-sealed interface OpaqueObject<T extends OpaqueObject<T>>
extends BindingObject, BindingContract<OpaqueObject<T>>, ValueAware<OpaqueData<?>>
An opaque object. This interface supports code generation for both
anyxml
and anydata
. Both of these
statements essentially share the same characteristic of storing data whose actual schema and representation is not
known at compile-time. Schema may be unknown even at runtime, and furthermore the representation may vary during
run-time, based on source of the data.
The code generation is therefore limited to a single interface, which only provides the default implementation
of implementedInterface()
bound to itself. The value is communicated through ValueAware.getValue()
, which
is only an encapsulation holding information about the object model and the data in that object model.
Implementations are strongly encouraged to use AbstractOpaqueObject
as their base implementation class.
-
Method Summary
Methods inherited from interface org.opendaylight.yangtools.binding.ValueAware
getValue
-
Method Details
-
implementedInterface
Description copied from interface:BindingContract
Return the interface implemented by this object. This method differs fromObject.getClass()
in that it returns the interface contract, not a concrete implementation class.- Specified by:
implementedInterface
in interfaceBindingContract<T extends OpaqueObject<T>>
- Returns:
- Implemented contract
-
hashCode
int hashCode()Hash code value of this object. This is a combination ofimplementedInterface()
and the value being held. The canonical computation algorithm is defined inAbstractOpaqueObject.hashCode()
. -
equals
Compare this object to another object. The comparison needs to take into accountimplementedInterface()
first and then follow comparison onValueAware.getValue()
. For canonical algorithm please refer toAbstractOpaqueObject.equals(Object)
.
-