Class NamespaceKeyCriterion<K>

java.lang.Object
org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceKeyCriterion<K>
Type Parameters:
K - Key type

@Beta public abstract class NamespaceKeyCriterion<K> extends Object
Namespace key matching criterion.
  • Constructor Details

    • NamespaceKeyCriterion

      public NamespaceKeyCriterion()
  • Method Details

    • latestRevisionModule

      public static NamespaceKeyCriterion<SourceIdentifier> latestRevisionModule(UnresolvedQName.Unqualified moduleName)
      Return a criterion which selects the latest known revision of a particular module.
      Parameters:
      moduleName - Module name
      Returns:
      A criterion object.
    • match

      public abstract boolean match(@NonNull K key)
      Match a key against this criterion.
      Parameters:
      key - Key to be matched
      Returns:
      True if the key matches this criterion, false otherwise.
    • select

      public abstract K select(@NonNull K first, @NonNull K second)
      Select the better match from two candidate keys.
      Parameters:
      first - First key
      second - Second key
      Returns:
      Selected key, must be either first or second key, by identity.
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • addToStringAttributes

      protected MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper toStringHelper)
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object