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
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.drools.planner.core.score.constraint;
    protected double weight;
    public DoubleConstraintOccurrence(String ruleIdObject... causes) {
        this(ruleId.causes);
    }
    public DoubleConstraintOccurrence(String ruleIdConstraintType constraintTypeObject... causes) {
        this(ruleIdconstraintType, 1.0, causes);
    }
    public DoubleConstraintOccurrence(String ruleIddouble weightObject... causes) {
        this(ruleId.weightcauses);
    }
    public DoubleConstraintOccurrence(String ruleIdConstraintType constraintTypedouble weightObject... causes) {
        super(ruleIdconstraintTypecauses);
        this. = weight;
    }
    public double getWeight() {
        return ;
    }
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        } else if (o instanceof IntConstraintOccurrence) {
            IntConstraintOccurrence other = (IntConstraintOccurrenceo;
            return new EqualsBuilder()
                    .appendSuper(super.equals(other))
                    .append(other.weight)
                    .isEquals();
        } else {
            return false;
        }
    }
    public int hashCode() {
        return new HashCodeBuilder()
                .appendSuper(super.hashCode())
                .append()
                .toHashCode();
    }
    @Override
    public String toString() {
        return super.toString() + "=" + ;
    }
New to GrepCode? Check out our FAQ X