add /apis.json and (re)add .../versions.json paths

This commit is contained in:
2023-04-04 15:45:51 -05:00
parent e779c392bb
commit 74cd0e0a57
4 changed files with 133 additions and 4 deletions

View File

@ -29,9 +29,60 @@ import java.util.List;
/*******************************************************************************
** List.of is "great", but annoying because it makes unmodifiable lists...
** So, replace it with this, which returns ArrayLists, which "don't suck"
**
** Can use it 3 ways:
** ListBuilder.of(value, value2, ...) => List (an ArrayList)
** ListBuilder.<ElementType>of(SomeList::new).with(value).with(value2)...build() => SomeList (the type you specify)
** new ListBuilder.<ElementType>.with(value).with(value2)...build() => List (an ArrayList - for when you have more than 10 values...)
*******************************************************************************/
public class ListBuilder
public class ListBuilder<E>
{
private List<E> list;
/*******************************************************************************
** Constructor
**
*******************************************************************************/
public ListBuilder()
{
this.list = new ArrayList<>();
}
/*******************************************************************************
** Constructor
**
*******************************************************************************/
public ListBuilder(List<E> list)
{
this.list = list;
}
/*******************************************************************************
**
*******************************************************************************/
public ListBuilder<E> with(E value)
{
list.add(value);
return (this);
}
/*******************************************************************************
**
*******************************************************************************/
public List<E> build()
{
return (this.list);
}
/*******************************************************************************
**