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>
identifiers
The identifiers of this naming rule.protected java.lang.String
name
The rule's name.protected int
priority
The rule's priority.static java.lang.String
UNDEFINED_NAME
Default name set to naming rules if no other can be found.static int
UNDEFINED_PRIORITY
Default 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 int
compareTo(NamingRule other)
boolean
equals(java.lang.Object obj)
java.util.Set<NamingRuleIdentifier>
getIdentifiers()
Returns the identifiers of the Naming Rule.java.lang.String
getName()
Returns the name of the Naming Rule.int
getPriority()
Returns the priority of the Naming Rule.int
hashCode()
NamingRule
intersect(java.util.Set<NamingRuleIdentifier> attributes)
Checks if the provided attributes match this naming rule.boolean
isEmpty()
Checks whether this naming rule has any Naming Identifiers.boolean
matches(java.util.Set<java.lang.String> attributes)
Checks if the provided attributes match this naming rule.java.lang.String
toString()
-
-
-
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:
true
if the rule is empty, otherwisefalse
.
-
compareTo
public int compareTo(NamingRule other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<NamingRule>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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:
true
if 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.
-
-