biweekly
Class Warning

java.lang.Object
  extended by biweekly.Warning

public class Warning
extends Object

Represents a warning.

Author:
Michael Angstadt

Constructor Summary
Warning(String message)
          Creates a new warning.
Warning(String message, Integer code)
          Creates a new warning.
 
Method Summary
 Integer getCode()
          Gets the warning code.
 String getMessage()
          Gets the warning message
static Warning parse(int code, Object... args)
          Creates a parser warning.
 String toString()
           
static Warning validate(int code, Object... args)
          Creates a validation warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Warning

public Warning(String message)
Creates a new warning.

Parameters:
message - the warning message

Warning

public Warning(String message,
               Integer code)
Creates a new warning.

Parameters:
message - the warning message
code - the message code
Method Detail

parse

public static Warning parse(int code,
                            Object... args)
Creates a parser warning.

Parameters:
code - the message code
args - the message arguments
Returns:
the warning

validate

public static Warning validate(int code,
                               Object... args)
Creates a validation warning.

Parameters:
code - the message code
args - the message arguments
Returns:
the warning

getCode

public Integer getCode()
Gets the warning code.

Returns:
the warning code or null if no code was specified

getMessage

public String getMessage()
Gets the warning message

Returns:
the warning message

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013-2014 Michael Angstadt. All Rights Reserved.