com.threerings.antidote
Class Violation

java.lang.Object
  extended by com.threerings.antidote.Violation
Direct Known Subclasses:
AtLeastOneFieldViolation, ConflictingPropertiesViolation, ControlDataViolation, EmptyListPropertyViolation, EmptyTextFieldViolation, InvalidBooleanViolation, InvalidEnumViolation, InvalidFileViolation, InvalidIntegerViolation, InvalidModeViolation, InvalidURLViolation, OnlyOneFieldViolation, UnknownArchitectureViolation, UnsetDependentFieldViolation, UnsetDependentPropertyViolation, UnsetFieldViolation, UnsetPropertyViolation, UnsetScriptPropertiesViolation, UnsetTextFieldViolation

public class Violation
extends Object

Holds validation violation information, suitable for displaying user feedback.

See Also:
RequiresValidation

Constructor Summary
Violation(String reason, Location location)
          Construct a new Violation, with the supplied String being a user readable reason that the validation occurred.
 
Method Summary
 Location getLocation()
          Returns the location of this violation.
 String getReason()
          Returns the user readable reason for this violation.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Violation

public Violation(String reason,
                 Location location)
Construct a new Violation, with the supplied String being a user readable reason that the validation occurred.

Parameters:
reason - The violation reason, as a user readable string.
location - The Location where the violation occurred.
Method Detail

getReason

public String getReason()
Returns the user readable reason for this violation.


getLocation

public Location getLocation()
Returns the location of this violation.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2008 Three Rings Design, Inc. All Rights Reserved. Released under a BSD license.