diff --git a/openAPI/src/main/java/jetbrains/exodus/bindings/ComparableBinding.java b/openAPI/src/main/java/jetbrains/exodus/bindings/ComparableBinding.java index d89bbbab7..0a835c603 100644 --- a/openAPI/src/main/java/jetbrains/exodus/bindings/ComparableBinding.java +++ b/openAPI/src/main/java/jetbrains/exodus/bindings/ComparableBinding.java @@ -17,6 +17,7 @@ import jetbrains.exodus.ArrayByteIterable; import jetbrains.exodus.ByteIterable; +import jetbrains.exodus.util.ByteIterableUtil; import jetbrains.exodus.util.LightOutputStream; import org.jetbrains.annotations.NotNull; @@ -29,6 +30,10 @@ * All the inheritors contain two static methods: one for getting {@linkplain ByteIterable} entry from a value, * and another for getting value from a {@linkplain ByteIterable} entry. * + *

Bindings save the order of values. This means that the greater the value, the greater the {@code ByteIterable} + * entry. The order of the {@code ByteIterable} entries is defined by + * {@linkplain ByteIterableUtil#compare(ByteIterable, ByteIterable)}. + * * @see BooleanBinding * @see ByteBinding * @see ComparableSetBinding diff --git a/openAPI/src/main/java/jetbrains/exodus/bindings/IntegerBinding.java b/openAPI/src/main/java/jetbrains/exodus/bindings/IntegerBinding.java index f16896ad7..49aad838f 100644 --- a/openAPI/src/main/java/jetbrains/exodus/bindings/IntegerBinding.java +++ b/openAPI/src/main/java/jetbrains/exodus/bindings/IntegerBinding.java @@ -29,8 +29,9 @@ * In addition to typical {@linkplain #intToEntry(int)} and {@linkplain #entryToInt(ByteIterable)} methods operating * with {@code ByteIterables} of length {@code 4}, {@code IntegerBinding} has a pair of methods for * serialization/deserialization of non-negative values to/from compressed entries: - * {@linkplain #intToCompressedEntry(int)} and {@linkplain #compressedEntryToInt(ByteIterable)}. The less is a value - * the shorter is its compressed entry. Sometimes compressed entries allow to significantly decrease database size. + * {@linkplain #intToCompressedEntry(int)} and {@linkplain #compressedEntryToInt(ByteIterable)}. The lower the value, + * the shorter the compressed entry. In some cases, compressed entries let you significantly decrease database size. + * Serialization of non-negative integers and longs to compressed entries also saves the order of values. * * @see ComparableBinding */ diff --git a/openAPI/src/main/java/jetbrains/exodus/bindings/LongBinding.java b/openAPI/src/main/java/jetbrains/exodus/bindings/LongBinding.java index 29ec82d56..abc31a9a1 100644 --- a/openAPI/src/main/java/jetbrains/exodus/bindings/LongBinding.java +++ b/openAPI/src/main/java/jetbrains/exodus/bindings/LongBinding.java @@ -29,8 +29,9 @@ * In addition to typical {@linkplain #longToEntry(long)} and {@linkplain #entryToLong(ByteIterable)} methods operating * with {@code ByteIterables} of length {@code 8}, {@code LongBinding} has a pair of methods for * serialization/deserialization of non-negative values to/from compressed entries: - * {@linkplain #longToCompressedEntry(long)} and {@linkplain #compressedEntryToLong(ByteIterable)}. The less is a value - * the shorter is its compressed entry. Sometimes compressed entries allow to significantly decrease database size. + * {@linkplain #longToCompressedEntry(long)} and {@linkplain #compressedEntryToLong(ByteIterable)}. The lower the value, + * the shorter the compressed entry. In some cases, compressed entries let you significantly decrease database size. + * Serialization of non-negative integers and longs to compressed entries also saves the order of values. * * @see ComparableBinding */