R - the top-level result model classpublic class TranslationResult<R>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private MessageReceiver |
receiver
Stores an instance which provides access to the messages which
occurred during the model translation.
|
private java.util.List<R> |
results
Stores the created language units / models.
|
| Constructor and Description |
|---|
TranslationResult()
Creates an empty instance of this class, e.g., to be used as a dummy translation result without real
messages / results.
|
TranslationResult(java.util.List<R> results,
MessageReceiver receiver)
Creates an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCount()
Returns the number of errors among the messages.
|
Message |
getMessage(int index)
Returns the specified message.
|
int |
getMessageCount()
Returns the number of messages.
|
java.util.List<IMessage> |
getMessageList()
Returns the list of messages (using the more common type).
|
java.util.List<Message> |
getMessageListSpecific()
Returns the list of messages.
|
R |
getResult(int index)
Returns the specified result.
|
int |
getResultCount()
Returns the number of projects being part of the result.
|
java.util.List<R> |
getResultsList()
Returns a copy of the list of projects.
|
private MessageReceiver receiver
private java.util.List<R> results
public TranslationResult()
public TranslationResult(java.util.List<R> results, MessageReceiver receiver)
results - the resulting language units (pass in only instances created for
this result)receiver - the message receiver providing access to translation
messages (may be null)public int getMessageCount()
public int getErrorCount()
public Message getMessage(int index)
index - the position of the message to be returnedjava.lang.IndexOutOfBoundsException - if index<0 || index>=getMessageCount()public java.util.List<IMessage> getMessageList()
public java.util.List<Message> getMessageListSpecific()
public int getResultCount()
public R getResult(int index)
index - the index of the result to be returnedjava.lang.IndexOutOfBoundsException - if
index<0 || index>=getResultCount()public java.util.List<R> getResultsList()
Copyright © 2009 - 2018 SSE. All Rights Reserved.