EntityAssignmentComparer class
比较两个实体分配以确定其相对优先级。
注解
按事件进行比较:assignEntity、chooseProperty、chooseEntity Then by operations by order from schema(通常在 assignEntity 内)。 然后出人意料地在预期之前。 然后,先到最老的转弯。 然后,按话语中的最小位置。
构造函数
| Entity |
初始化 EntityAssignmentComparer 类的新实例。 |
方法
| compare(Partial<Entity |
将 EntityAssignment x 与 y 进行比较,以确定其相对优先级。 |
构造函数详细信息
EntityAssignmentComparer(string[])
初始化 EntityAssignmentComparer 类的新实例。
new EntityAssignmentComparer(operationPreference: string[])
参数
- operationPreference
-
string[]
操作首选项。
方法详细信息
compare(Partial<EntityAssignment>, Partial<EntityAssignment>)
将 EntityAssignment x 与 y 进行比较,以确定其相对优先级。
function compare(x: Partial<EntityAssignment>, y: Partial<EntityAssignment>): number
参数
- x
-
Partial<EntityAssignment>
要比较的第一个实体分工。
- y
-
Partial<EntityAssignment>
要比较的第二个实体分工。
返回
number
表示 x 的相对优先级的数字值。