Package com._1c.g5.v8.dt.core.model
Class AbstractEObjectCollectionRuntimeOrderSorterDelegate<T extends Comparable<T>>
java.lang.Object
com._1c.g5.v8.dt.core.model.AbstractEObjectCollectionRuntimeOrderSorterDelegate<T>
- All Implemented Interfaces:
IModelObjectCollectionRuntimeOrderSorterDelegate
- Direct Known Subclasses:
FormHandlersCollectionRuntimeOrderSorterDelegate,MdObjectCollectionRuntimeOrderSorterDelegate,ObjectRightsCollectionRuntimeOrderSorterDelegate,RightCollectionRuntimeOrderSorterDelegate,TypeItemCollectionRuntimeOrderSorterDelegate
public abstract class AbstractEObjectCollectionRuntimeOrderSorterDelegate<T extends Comparable<T>>
extends Object
implements IModelObjectCollectionRuntimeOrderSorterDelegate
Abstract implementation
IModelObjectCollectionRuntimeOrderSorterDelegate.
Based on the implementation of the method of obtaining a sort key maps
in the descendants to compare e-objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TgetKey(org.eclipse.emf.ecore.EObject actualEObject) Descendants must implement a method to obtain the sort key for e-object.protected booleanisCollectionNoNeedsSort(org.eclipse.emf.common.util.EList<? extends org.eclipse.emf.ecore.EObject> actual) Check min collection size to sort.voidsort(org.eclipse.emf.common.util.EList<? extends org.eclipse.emf.ecore.EObject> actual) Sorts e-object collection in runtime order.
-
Constructor Details
-
AbstractEObjectCollectionRuntimeOrderSorterDelegate
public AbstractEObjectCollectionRuntimeOrderSorterDelegate()
-
-
Method Details
-
sort
public void sort(org.eclipse.emf.common.util.EList<? extends org.eclipse.emf.ecore.EObject> actual) Description copied from interface:IModelObjectCollectionRuntimeOrderSorterDelegateSorts e-object collection in runtime order.- Specified by:
sortin interfaceIModelObjectCollectionRuntimeOrderSorterDelegate- Parameters:
actual- the e-object actual collection, cannot benull
-
isCollectionNoNeedsSort
protected boolean isCollectionNoNeedsSort(org.eclipse.emf.common.util.EList<? extends org.eclipse.emf.ecore.EObject> actual) Check min collection size to sort.- Parameters:
actual- the actual collection, cannot benull- Returns:
trueif collection no needs sort,falseotherwise
-
getKey
Descendants must implement a method to obtain the sort key for e-object.- Parameters:
actualEObject- the e-object, cannot benull- Returns:
- the sort key, cannot be
null
-