com.aragost.javahg
Enum Phase

java.lang.Object
  extended by java.lang.Enum<Phase>
      extended by com.aragost.javahg.Phase
All Implemented Interfaces:
Serializable, Comparable<Phase>

public enum Phase
extends Enum<Phase>

Enum type to represent phases introduced in Mercurial 2.1


Enum Constant Summary
DRAFT
           
PUBLIC
           
SECRET
           
 
Method Summary
static Phase fromText(String s)
          Return the Phase that correspond to the specified text.
static Phase valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Phase[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PUBLIC

public static final Phase PUBLIC

DRAFT

public static final Phase DRAFT

SECRET

public static final Phase SECRET
Method Detail

values

public static Phase[] 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 (Phase c : Phase.values())
    System.out.println(c);

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

valueOf

public static Phase valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromText

public static Phase fromText(String s)
Return the Phase that correspond to the specified text.

The text is what mercurial uses in the command output (i.e. public, draft, or secret).

Parameters:
s -
Returns:
the Phase that correspond to the specified text. null is returned for the empty string.
Throws:
IllegalArgumentException - if no phase correspond to the specified text


Copyright © 2011-2013 aragost Trifork ag. All Rights Reserved.