Class RepositoryObjectKey

java.lang.Object
org.smartparam.engine.annotated.RepositoryObjectKey
All Implemented Interfaces:
Comparable<RepositoryObjectKey>

public class RepositoryObjectKey extends Object implements Comparable<RepositoryObjectKey>
Complex key that can be used in maps that need only unique entries and custom ordering at the same time. Object consists of:
  • key - string name, that can be used to preserve uniqueness of entries
  • order - integer value, that can be used for ordering

Only key is used to compute hash key and determine equality of two objects. Only order is used in comparison method from Comparable interface.
Since:
0.1.0
Author:
Adam Dubiel
  • Constructor Details

    • RepositoryObjectKey

      public RepositoryObjectKey(String key)
      Create new repository key with only string key.
      Parameters:
      key - unique key
    • RepositoryObjectKey

      public RepositoryObjectKey(String key, int order)
      Create new repository key with string key and order.
      Parameters:
      key - unique key
      order - order of item if sorted
  • Method Details