- All Superinterfaces:
Adapter.Contract<T>
,Adapter.Contract.Scalar<T>
- Enclosing interface:
Bitstring
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The
BIT
and VARBIT
types' PostgreSQL semantics: the
number of bits, and the sequence of bytes they're packed into.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Functional interface to obtain information from the PostgreSQL type modifier applied to the type.Nested classes/interfaces inherited from interface org.postgresql.pljava.Adapter.Contract
Adapter.Contract.Array<T,
E, A extends Adapter<E, ?>>, Adapter.Contract.Scalar<T> -
Method Summary
Modifier and TypeMethodDescriptionconstruct
(int nBits, ByteBuffer bytes) Constructs a representation T from the components of the PostgreSQL data type.
-
Method Details
-
construct
Constructs a representation T from the components of the PostgreSQL data type.- Parameters:
nBits
- the actual number of bits in the value, not necessarily a multiple of 8. For type BIT, must equal the modifier nBits if specified; for VARBIT, must be equal or smaller.bytes
- a buffer of ceiling(nBits/8) bytes, not aliasing any internal storage, so safely readable (and writable, if useful for format conversion). Before accessing it in wider units, its byte order should be explicitly set. Within each byte, the logical order of the bits is from MSB to LSB; beware that this within-byte bit order is the reverse of what java.util.BitSet.valueOf(...) expects. When nBits is not a multiple of 8, the unused low-order bits of the final byte must be zero.
-