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 Type
    Method
    Description
    protected abstract T
    getKey(org.eclipse.emf.ecore.EObject actualEObject)
    Descendants must implement a method to obtain the sort key for e-object.
    protected boolean
    isCollectionNoNeedsSort(org.eclipse.emf.common.util.EList<? extends org.eclipse.emf.ecore.EObject> actual)
    Check min collection size to sort.
    void
    sort(org.eclipse.emf.common.util.EList<? extends org.eclipse.emf.ecore.EObject> actual)
    Sorts e-object collection in runtime order.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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: IModelObjectCollectionRuntimeOrderSorterDelegate
      Sorts e-object collection in runtime order.
      Specified by:
      sort in interface IModelObjectCollectionRuntimeOrderSorterDelegate
      Parameters:
      actual - the e-object actual collection, cannot be null
    • 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 be null
      Returns:
      true if collection no needs sort, false otherwise
    • getKey

      protected abstract T getKey(org.eclipse.emf.ecore.EObject actualEObject)
      Descendants must implement a method to obtain the sort key for e-object.
      Parameters:
      actualEObject - the e-object, cannot be null
      Returns:
      the sort key, cannot be null