summaryrefslogtreecommitdiffstats
path: root/searchlib/src/main/java/com/yahoo/searchlib/expression/MD5BitFunctionNode.java
blob: f7e85b974d5669d6e353b0683e5a185e24b7845a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchlib.expression;

/**
 * This function is a request to calculate the MD5 of the result of its argument.
 *
 * @author baldersheim
 * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
 */
public class MD5BitFunctionNode extends UnaryBitFunctionNode {

    public static final int classId = registerClass(0x4000 + 70, MD5BitFunctionNode.class);

    /**
     * Constructs an empty result node. <b>NOTE:</b> This instance is broken until non-optional member data is set.
     */
    public MD5BitFunctionNode() {

    }

    /**
     * Constructs an instance of this class with given argument and number of bits.
     *
     * @param arg     The argument for this function.
     * @param numBits The number of bits to operate on.
     */
    public MD5BitFunctionNode(ExpressionNode arg, int numBits) {
        super(arg, numBits);
    }

    @Override
    protected int onGetClassId() {
        return classId;
    }
}