-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make lists read/write in the example instances
- Loading branch information
Showing
2 changed files
with
26 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
import org.ivoa.dm.ivoa.StringIdentifier; | ||
import org.ivoa.vodml.stdtypes.Unit; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.Date; | ||
import java.util.GregorianCalendar; | ||
|
@@ -41,7 +42,7 @@ public abstract class BaseExample implements ExampleGenerator { | |
new Person("Nevil Maskelyne ", "[email protected]", institutes[1], new StringIdentifier("https://notreallyorcid.org/0000-0001-0002-007")), | ||
|
||
}; | ||
protected List<Investigator> investigators = Arrays.asList( | ||
protected List<Investigator> investigators = makeList( | ||
new Investigator ( people[0], InvestigatorKind.PI, false ), | ||
new Investigator ( people[1], InvestigatorKind.COI, true )); | ||
|
||
|
@@ -50,7 +51,7 @@ public abstract class BaseExample implements ExampleGenerator { | |
new Reviewer(people[4])// reviewer not on TAC | ||
}; | ||
|
||
protected TAC tac = new TAC( Arrays.asList( | ||
protected TAC tac = new TAC( makeList( | ||
new CommitteeMember( reviewers[0], TacRole.CHAIR ), | ||
new CommitteeMember ( reviewers[1], TacRole.SCIENCEREVIEWER) | ||
)); | ||
|
@@ -101,6 +102,18 @@ protected Telescope createTelescope(String name, double x, double y, double z) { | |
})); | ||
|
||
} | ||
|
||
|
||
/** | ||
* make a read-write list. | ||
* | ||
* @param <T> list type | ||
* @param a objects | ||
* @return a list | ||
*/ | ||
protected <T> List<T> makeList(T... a) { | ||
return new ArrayList<T>(Arrays.asList(a)); | ||
} | ||
/** | ||
* {@inheritDoc} | ||
* overrides @see org.ivoa.dm.proposal.prop.ExampleGenerator#getICRF() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters