Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2011 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.api.domain.entity;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;

Specifies that the class is a planning entity. Each planning entity must have at least on PlanningVariable property.

The class should have a public no-arg constructor, so it can be instantiated by Drools Planner.

public @interface PlanningEntity {

    
Allows a collection of planning entities to be sorted by difficulty.

Do not use together with difficultyWeightFactoryClass().

Returns:
NullDifficultyComparator when it is null (workaround for annotation limitation)
    public Class<? extends ComparatordifficultyComparatorClass() default NullDifficultyComparator.class;
    interface NullDifficultyComparator extends Comparator {}

    
Allows a collection of planning entities to be sorted by difficulty.

Do not use together with difficultyComparatorClass().

Returns:
NullDifficultyWeightFactory when it is null (workaround for annotation limitation)
See also:
PlanningEntityDifficultyWeightFactory
            default NullDifficultyWeightFactory.class;
New to GrepCode? Check out our FAQ X