Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2010 JBoss Inc
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.drools.conf;

A class for the alpha node hashing threshold configuration.
    private static final long serialVersionUID = 510l;

The property name for the default DIALECT
    public static final String PROPERTY_NAME = "drools.alphaNodeHashingThreshold";
alpha threshold
    private final int threshold;
Private constructor to enforce the use of the factory method

    private AlphaThresholdOptionint threshold ) {
        this. = threshold;
This is a factory method for this Alpha Threshold configuration. The factory method is a best practice for the case where the actual object construction is changed in the future.

threshold the threshold value for the alpha hashing option
the actual type safe alpha threshold configuration.
    public static AlphaThresholdOption getint threshold ) {
        return new AlphaThresholdOptionthreshold );
    public String getPropertyName() {
        return ;
Returns the threshold value for alpha hashing

    public int getThreshold() {
        return ;
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ;
        return result;
    public boolean equals(Object obj) {
        if ( this == obj ) return true;
        if ( obj == null ) return false;
        if ( getClass() != obj.getClass() ) return false;
        AlphaThresholdOption other = (AlphaThresholdOptionobj;
        if (  != other.threshold ) return false;
        return true;
New to GrepCode? Check out our FAQ X