Beispiel #1
0
            protected DictionaryArrayBuilderBase(IEqualityComparer <T> comparer = null, HashFunctionDelegate hashFunc = null)
            {
                IndicesBuffer = new ArrowBuffer.Builder <int>();
                NullBitmap    = new ArrowBuffer.Builder <byte>();

                if (comparer != null)
                {
                    Comparer = comparer;
                }

                if (hashFunc != null)
                {
                    HashFunction = hashFunc;
                }
            }
Beispiel #2
0
                public DictionaryEntry(T value, IEqualityComparer <T> comparer = null, HashFunctionDelegate hashFunction = null)
                {
                    if (comparer == null)
                    {
                        comparer = EqualityComparer <T> .Default;
                    }
                    _comparer = comparer;

                    if (hashFunction == null)
                    {
                        hashFunction = comparer.GetHashCode;
                    }

                    _hashFunction = hashFunction;
                    Value         = value;
                }
 public Builder(IEqualityComparer <float> comparer = null, HashFunctionDelegate hashFunc = null) : base(comparer, hashFunc)
 {
 }
Beispiel #4
0
            /// <inheritdoc />
            public StringDictionaryBuilder(Encoding encoding = null, IEqualityComparer <string> comparer = null, HashFunctionDelegate hashFunc = null) : base(comparer, hashFunc)
            {
                if (encoding == null)
                {
                    encoding = DefaultEncoding;
                }

                Encoding     = encoding;
                ValueOffsets = new ArrowBuffer.Builder <int>();
                ValueBuffer  = new ArrowBuffer.Builder <byte>();
            }
Beispiel #5
0
 internal PrimitiveDictionaryArrayBuilder(IDictionaryArrayBuilder <TTo, TArray, IDictionaryArrayBuilder <TTo, TArray> > builder,
                                          IEqualityComparer <TTo> comparer = null, HashFunctionDelegate hashFunc = null) : base(comparer, hashFunc)
 {
     ArrayBuilder = builder ?? throw new ArgumentNullException(nameof(builder));
 }
Beispiel #6
0
 /// <inheritdoc />
 public Builder(IEqualityComparer <int> comparer = null, HashFunctionDelegate hashFunc = null) : base(new DateBuilder(comparer, hashFunc))
 {
 }