Class ColumnLoader.ValueSet

  • Enclosing class:
    ColumnLoader<T>

    static class ColumnLoader.ValueSet
    extends java.lang.Object
    Set of values of a column, created during the load process, and converted to a serializable (and more compact) form before load completes.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.Class clazz  
      (package private) boolean containsNull  
      (package private) java.util.Map<java.lang.Comparable,​java.lang.Comparable> map  
      (package private) java.lang.Comparable max  
      (package private) java.lang.Comparable min  
      (package private) java.util.List<java.lang.Comparable> values  
    • Constructor Summary

      Constructors 
      Constructor Description
      ValueSet​(java.lang.Class clazz)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static int abs2​(int v)
      Two's complement absolute on int value.
      private static long abs2​(long v)
      Two's complement absolute on long value.
      (package private) void add​(java.lang.Comparable e)  
      private boolean canBeLong​(java.lang.Object o)  
      private ArrayTable.Representation chooseFixedRep​(int ordinal, Primitive p, long min, long max)
      Chooses a representation for a fixed-precision primitive type (boolean, byte, char, short, int, long).
      (package private) ArrayTable.Representation chooseRep​(int ordinal)  
      (package private) ArrayTable.Column freeze​(int ordinal, int[] sources)
      Freezes the contents of this value set into a column, optionally re-ordering if sources is specified.
      private long toLong​(java.lang.Object o)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • clazz

        final java.lang.Class clazz
      • map

        final java.util.Map<java.lang.Comparable,​java.lang.Comparable> map
      • values

        final java.util.List<java.lang.Comparable> values
      • min

        java.lang.Comparable min
      • max

        java.lang.Comparable max
      • containsNull

        boolean containsNull
    • Constructor Detail

      • ValueSet

        ValueSet​(java.lang.Class clazz)
    • Method Detail

      • add

        void add​(java.lang.Comparable e)
      • freeze

        ArrayTable.Column freeze​(int ordinal,
                                 int[] sources)
        Freezes the contents of this value set into a column, optionally re-ordering if sources is specified.
      • toLong

        private long toLong​(java.lang.Object o)
      • canBeLong

        private boolean canBeLong​(java.lang.Object o)
      • chooseFixedRep

        private ArrayTable.Representation chooseFixedRep​(int ordinal,
                                                         Primitive p,
                                                         long min,
                                                         long max)
        Chooses a representation for a fixed-precision primitive type (boolean, byte, char, short, int, long).
        Parameters:
        ordinal - Ordinal of this column in table
        p - Type that values are to be returned as (not necessarily the same as they will be stored)
        min - Minimum value to be encoded
        max - Maximum value to be encoded (inclusive)
      • abs2

        private static int abs2​(int v)
        Two's complement absolute on int value.
      • abs2

        private static long abs2​(long v)
        Two's complement absolute on long value.