com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data
Enum CompareType

java.lang.Object
  extended by java.lang.Enum<CompareType>
      extended by com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.CompareType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CompareType>

public enum CompareType
extends java.lang.Enum<CompareType>

Enum of different ways of comparing a pattern.

Author:
Robert Sandell <robert.sandell@sonyericsson.com>

Enum Constant Summary
ANT
          ANT style path comparison.
PLAIN
          Plain equals comparison.
REG_EXP
          Regular expression comparison.
 
Method Summary
static CompareType findByDisplayName(java.lang.String displayName)
          Finds a CompareType based on displayName.
 java.lang.String getDisplayName()
          Returns a "human readable" name of the instance.
static java.util.List<java.lang.String> getDisplayNames()
          Gets a list of all CompareType's displayNames.
 boolean matches(java.lang.String pattern, java.lang.String str)
          Tells if the given string matches the given pattern based on the algorithm of this CompareType instance.
 java.lang.String toString()
           
static CompareType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CompareType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PLAIN

public static final CompareType PLAIN
Plain equals comparison.


ANT

public static final CompareType ANT
ANT style path comparison.


REG_EXP

public static final CompareType REG_EXP
Regular expression comparison.

Method Detail

values

public static CompareType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CompareType c : CompareType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CompareType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getDisplayNames

public static java.util.List<java.lang.String> getDisplayNames()
Gets a list of all CompareType's displayNames.

Returns:
a list of available displaynames.

findByDisplayName

public static CompareType findByDisplayName(java.lang.String displayName)
Finds a CompareType based on displayName.

Parameters:
displayName - the displayName
Returns:
the CompareType that matches the displayName or null if none is found.

matches

public boolean matches(java.lang.String pattern,
                       java.lang.String str)
Tells if the given string matches the given pattern based on the algorithm of this CompareType instance.

Parameters:
pattern - the pattern
str - the string
Returns:
true if the string matches the pattern.

getDisplayName

public java.lang.String getDisplayName()
Returns a "human readable" name of the instance.

Returns:
the display name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<CompareType>


Copyright © 2004-2012. All Rights Reserved.