- java.lang.Object
-
- org.tentackle.model.ModelError
-
public class ModelError extends Object
Describes a model error.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description ModelError(ModelElement element, String message)Creates a model error.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)ModelElementgetElement()Gets the related element.StringgetMessage()Gets the error message.inthashCode()StringtoString()static StringtoString(Collection<ModelError> errors)Creates a string from a collection of errors.
Multiple errors are separated by a newline.
-
-
-
Constructor Detail
-
ModelError
public ModelError(ModelElement element, String message)
Creates a model error.- Parameters:
element- the related elementmessage- the error message
-
-
Method Detail
-
toString
public static String toString(Collection<ModelError> errors)
Creates a string from a collection of errors.
Multiple errors are separated by a newline.- Parameters:
errors- the errors- Returns:
- the error string
-
getElement
public ModelElement getElement()
Gets the related element.- Returns:
- the model element
-
getMessage
public String getMessage()
Gets the error message.- Returns:
- the error
-
-