Package com.ibm.di.cdm.core
Class NamingRule
- java.lang.Object
-
- com.ibm.di.cdm.core.NamingRule
-
- All Implemented Interfaces:
java.lang.Comparable<NamingRule>
- Direct Known Subclasses:
DefaultNamingRule
public abstract class NamingRule extends java.lang.Object implements java.lang.Comparable<NamingRule>
Class used for representing Naming Rules.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<NamingRuleIdentifier>identifiersThe identifiers of this naming rule.protected java.lang.StringnameThe rule's name.protected intpriorityThe rule's priority.static java.lang.StringUNDEFINED_NAMEDefault name set to naming rules if no other can be found.static intUNDEFINED_PRIORITYDefault priority set to naming rules if no other can be found.
-
Constructor Summary
Constructors Constructor Description NamingRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(NamingRule other)booleanequals(java.lang.Object obj)java.util.Set<NamingRuleIdentifier>getIdentifiers()Returns the identifiers of the Naming Rule.java.lang.StringgetName()Returns the name of the Naming Rule.intgetPriority()Returns the priority of the Naming Rule.inthashCode()NamingRuleintersect(java.util.Set<NamingRuleIdentifier> attributes)Checks if the provided attributes match this naming rule.booleanisEmpty()Checks whether this naming rule has any Naming Identifiers.booleanmatches(java.util.Set<java.lang.String> attributes)Checks if the provided attributes match this naming rule.java.lang.StringtoString()
-
-
-
Field Detail
-
UNDEFINED_PRIORITY
public static final int UNDEFINED_PRIORITY
Default priority set to naming rules if no other can be found.- See Also:
- Constant Field Values
-
UNDEFINED_NAME
public static final java.lang.String UNDEFINED_NAME
Default name set to naming rules if no other can be found.- See Also:
- Constant Field Values
-
priority
protected int priority
The rule's priority.
-
name
protected java.lang.String name
The rule's name.
-
identifiers
protected java.util.Set<NamingRuleIdentifier> identifiers
The identifiers of this naming rule.
-
-
Method Detail
-
getIdentifiers
public final java.util.Set<NamingRuleIdentifier> getIdentifiers()
Returns the identifiers of the Naming Rule.- Returns:
- rule's identifiers.
-
getName
public final java.lang.String getName()
Returns the name of the Naming Rule.- Returns:
- rule's name.
-
getPriority
public final int getPriority()
Returns the priority of the Naming Rule.- Returns:
- rule's priority.
-
isEmpty
public final boolean isEmpty()
Checks whether this naming rule has any Naming Identifiers.- Returns:
trueif the rule is empty, otherwisefalse.
-
compareTo
public int compareTo(NamingRule other)
- Specified by:
compareToin interfacejava.lang.Comparable<NamingRule>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
matches
public boolean matches(java.util.Set<java.lang.String> attributes)
Checks if the provided attributes match this naming rule.- Parameters:
attributes- the attributes to be checked.- Returns:
trueif the attributes match this rule, otherwisefalse.
-
intersect
public NamingRule intersect(java.util.Set<NamingRuleIdentifier> attributes)
Checks if the provided attributes match this naming rule.- Parameters:
attributes- the attributes to be checked.- Returns:
- NaminRule that contains unsatisfied NamingRuleIdentifiers.
-
-