public static class Representative.Representatives
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Representative> |
representatives
Представители
|
| Constructor and Description |
|---|
Representatives() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Representative> |
getRepresentatives()
Представители
Этот метод доступа возвращает ссылку на текущий список, а не снимок.
|
protected java.util.List<Representative> representatives
public java.util.List<Representative> getRepresentatives()
Этот метод доступа возвращает ссылку на текущий список, а не снимок. Поэтому
любые изменения, которые вы вносите в возвращаемый список, будут
присутствовать внутри объекта JAXB. Вот почему нет метода set
для свойства representatives.
Например, чтобы добавить новый элемент, сделайте следующее:
getRepresentatives().add(newItem);
Representative