Permalink
Browse files

Javadoc++

  • Loading branch information...
archiecobbs committed Nov 17, 2017
1 parent 129a48b commit a933dd2306aa271f6890e7bde31eb85c1e6c2f0d
Showing with 89 additions and 3 deletions.
  1. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/ArrayType.java
  2. +5 −3 permazen-coreapi/src/main/java/io/permazen/core/type/BigDecimalType.java
  3. +1 −0 permazen-coreapi/src/main/java/io/permazen/core/type/BooleanArrayType.java
  4. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/DurationType.java
  5. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/EnumType.java
  6. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/Inet4AddressType.java
  7. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/Inet6AddressType.java
  8. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/InetAddressType.java
  9. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/InstantType.java
  10. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/LocalDateTimeType.java
  11. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/LocalDateType.java
  12. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/LocalTimeType.java
  13. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/MonthDayType.java
  14. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/ObjIdType.java
  15. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/ObjectArrayType.java
  16. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/OffsetDateTimeType.java
  17. +5 −0 permazen-coreapi/src/main/java/io/permazen/core/type/OffsetTimeType.java
  18. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/PeriodType.java
  19. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/ReferenceFieldType.java
  20. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/TupleFieldType.java
  21. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/UUIDType.java
  22. +4 −0 permazen-coreapi/src/main/java/io/permazen/core/type/YearMonthType.java
  23. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/YearType.java
  24. +5 −0 permazen-coreapi/src/main/java/io/permazen/core/type/ZoneOffsetType.java
  25. +3 −0 permazen-coreapi/src/main/java/io/permazen/core/type/ZonedDateTimeType.java
@@ -19,6 +19,9 @@
* Superclass for all array {@link FieldType}s.
*
* <p>
* The string form looks like {@code [ elem1, elem2, ..., elemN ]}.
*
* <p>
* This class does not support null arrays; wrap in {@link NullSafeType} to get that.
* The default value is the empty array.
*
@@ -22,9 +22,11 @@
*
* <p>
* This class' encoding preserves precision information, and therefore treats as distinct instances that differ only in
* trailing zeroes after the decimal point. For example, {@code 1.23 < 1.230}. As a result, this class' {@link #compare compare()}
* method is consistent with {@link BigDecimal#equals BigDecimal.equals()}, unlike * {@link BigDecimal}'s own
* {@link BigDecimal#compareTo compareTo()} method, which is not.
* trailing zeroes after the decimal point. For example, {@code 1.23 < 1.230}.
*
* <p>
* As a result, this class' {@link #compare compare()} method is consistent with {@link BigDecimal#equals BigDecimal.equals()},
* unlike {@link BigDecimal}'s own {@link BigDecimal#compareTo compareTo()} method, which is not.
*/
public class BigDecimalType extends NonNullFieldType<BigDecimal> {
@@ -21,6 +21,7 @@
*
* <p>
* Each boolean value is encoded in two bits: end of array ({@code 00}), false ({@code 01}), or true ({@code 10}).
* Four bit pairs are stored in each encoded byte, starting with the high-order bit pair.
*/
public class BooleanArrayType extends ArrayType<boolean[], Boolean> {
@@ -17,6 +17,10 @@
/**
* Non-null {@link Duration} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via two consecutive {@link LongEncoder}-encoded values, {@linkplain Duration#getSeconds seconds}
* followed by {@linkplain Duration#getNano nanoseconds}.
*/
public class DurationType extends NonNullFieldType<Duration> {
@@ -23,6 +23,9 @@
/**
* This is the inner, non-null supporting {@link io.permazen.core.FieldType} for {@link EnumFieldType}.
*
* <p>
* Binary encoding is via the {@link UnsignedIntEncoder}-encoded {@linkplain EnumValue#getOrdinal ordinal} value.
*/
public class EnumType extends NonNullFieldType<EnumValue> {
@@ -11,6 +11,9 @@
/**
* Non-null {@link Inet4Address} type. Null values are not supported by this class.
*
* <p>
* Binary encoding uses the binary value from {@link java.net.InetAddress#getAddress}.
*/
public class Inet4AddressType extends AbstractInetAddressType<Inet4Address> {
@@ -11,6 +11,9 @@
/**
* Non-null {@link Inet6Address} type. Null values are not supported by this class.
*
* <p>
* Binary encoding uses the binary value from {@link java.net.InetAddress#getAddress}.
*/
public class Inet6AddressType extends AbstractInetAddressType<Inet6Address> {
@@ -14,6 +14,10 @@
/**
* Non-null {@link InetAddress} type. Null values are not supported by this class.
*
* <p>
* Binary encoding uses the binary value from {@link java.net.InetAddress#getAddress}, preceded by
* {@code 0x04} for IPv4 or {@code 0x06} for IPv6.
*/
public class InetAddressType extends AbstractInetAddressType<InetAddress> {
@@ -17,6 +17,10 @@
/**
* Non-null {@link Instant} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via two consecutive {@link LongEncoder}-encoded values, {@linkplain Instant#getEpochSecond epoch seconds}
* followed by {@linkplain Instant#getNano nanoseconds}.
*/
public class InstantType extends NonNullFieldType<Instant> {
@@ -19,6 +19,10 @@
/**
* Non-null {@link LocalDateTime} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via two consecutive {@link LongEncoder}-encoded values, {@linkplain Instant#getEpochSecond epoch seconds}
* followed by {@linkplain Instant#getNano nanoseconds} of the date/time in {@link ZoneOffset#UTC UTC}.
*/
public class LocalDateTimeType extends NonNullFieldType<LocalDateTime> {
@@ -17,6 +17,9 @@
/**
* Non-null {@link LocalDate} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via a single {@link LongEncoder}-encoded value representing the {@linkplain LocalDate#toEpochDay epoch day}.
*/
public class LocalDateType extends NonNullFieldType<LocalDate> {
@@ -17,6 +17,10 @@
/**
* Non-null {@link LocalTime} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via a single {@link LongEncoder}-encoded value representing
* {@linkplain LocalTime#toNanoOfDay nanoseconds in the day}.
*/
public class LocalTimeType extends NonNullFieldType<LocalTime> {
@@ -17,6 +17,10 @@
/**
* Non-null {@link MonthDay} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via an {@link UnsignedIntEncoder}-encoded value {@code 32} times the
* {@linkplain MonthDay#getMonthValue month value}{@code - 1}, plus the {@linkplain MonthDay#getDayOfMonth day of the month}.
*/
public class MonthDayType extends NonNullFieldType<MonthDay> {
@@ -14,6 +14,9 @@
/**
* Non-null field type for encoding {@link ObjId}s. Null values are not supported by this class.
*
* <p>
* Binary encoding uses the value from {@link ObjId#getBytes}.
*/
public class ObjIdType extends NonNullFieldType<ObjId> {
@@ -20,6 +20,10 @@
/**
* Array type for object arrays having non-primitive element types. Does not support null arrays.
*
* <p>
* In the binary encoding, array elements are simply concatenated, with each element preceded by a {@code 0x01} byte.
* After the last element, a final {@code 0x00} byte follows. This encoding ensures lexicographic ordering.
*
* @param <E> array element type
*/
public class ObjectArrayType<E> extends ArrayType<E[], E> {
@@ -13,6 +13,9 @@
/**
* Non-null {@link OffsetDateTime} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via the concatenation of the encodings of {@link Instant} and {@link ZoneOffset}.
*/
public class OffsetDateTimeType extends Concat2Type<OffsetDateTime, Instant, ZoneOffset> {
@@ -14,6 +14,11 @@
/**
* Non-null {@link OffsetTime} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via the concatenation of the encodings of {@link LongType} and {@link ZoneOffset}, where the first value
* is the {@linkplain LocalTime#toNanoOfDay nanoseconds in the day} normalized to {@link ZoneOffset#UTC UTC}.
* This keeps the binary sort order consistent with {@link OffsetTime#compareTo}.
*/
public class OffsetTimeType extends Concat2Type<OffsetTime, Long, ZoneOffset> {
@@ -17,6 +17,10 @@
/**
* Non-null {@link Period} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via three consecutive {@link LongEncoder}-encoded values: the {@linkplain Period#getYears years},
* the {@linkplain Period#getMonths months}, and the {@linkplain Period#getDays days}.
*/
public class PeriodType extends NonNullFieldType<Period> {
@@ -21,6 +21,9 @@
* The {@link FieldType} for {@link io.permazen.core.ReferenceField}s. Instances support object type restriction.
*
* <p>
* Binary encoding uses the value from {@link ObjId#getBytes}, or {@code 0xff} to represent null.
*
* <p>
* Null values are supported by this class.
*/
public class ReferenceFieldType extends NullSafeType<ObjId> {
@@ -19,6 +19,9 @@
/**
* Superclass for {@link FieldType}s created from the concatenation of other {@link FieldType}s.
*
* <p>
* Binary encoding is via the concatenation of the individual element encodings.
*/
public abstract class TupleFieldType<T extends Tuple> extends NonNullFieldType<T> {
@@ -16,6 +16,10 @@
/**
* Non-null {@link UUID} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is 16 bytes, consisting of the {@linkplain UUID#getMostSignificantBits eight high-order bytes} followed by the
* {@linkplain UUID#getLeastSignificantBits eight low-order bytes}.
*/
public class UUIDType extends NonNullFieldType<UUID> {
@@ -17,6 +17,10 @@
/**
* Non-null {@link YearMonth} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via two consecutive {@link LongEncoder}-encoded values, the {@linkplain YearMonth#getYear year}
* followed by the {@linkplain YearMonth#getMonthValue month value}.
*/
public class YearMonthType extends NonNullFieldType<YearMonth> {
@@ -17,6 +17,9 @@
/**
* Non-null {@link Year} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is the {@link LongEncoder}-encoded {@linkplain Year#getValue year value}.
*/
public class YearType extends NonNullFieldType<Year> {
@@ -17,6 +17,11 @@
/**
* Non-null {@link ZoneOffset} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via the {@link LongEncoder}-encoded negative of the
* {@linkplain ZoneOffset#getTotalSeconds total seconds value}. The value is negated because higher offsets
* {@linkplain ZoneOffset#compareTo sort} before lower ones.
*/
public class ZoneOffsetType extends NonNullFieldType<ZoneOffset> {
@@ -14,6 +14,9 @@
/**
* Non-null {@link ZonedDateTime} type. Null values are not supported by this class.
*
* <p>
* Binary encoding is via the concatenation of the encodings of {@link OffsetDateTimeType} and {@link ZoneIdType}.
*/
public class ZonedDateTimeType extends Concat2Type<ZonedDateTime, OffsetDateTime, ZoneId> {

0 comments on commit a933dd2

Please sign in to comment.