# Class ListModel2<E>

java.lang.Object
javax.swing.AbstractListModel<E>
uk.ac.starlink.topcat.ListModel2<E>

All Implemented Interfaces:
  `Serializable, ListModel<E>`

public class ListModel2<E> extends AbstractListModel<E>
ListModel implementation that represents the concatenation of two supplied constituent ListModels.

Since:
  10 May 2018
Author:
  Mark Taylor
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class AbstractListModel

`listenerList`

## Constructor Summary

Constructors
Constructor
Description
`ListModel2(ListModel<E> model1, ListModel<E> model2)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`E`
`getElementAt(int ix)`
`ListModel<E>`
`getModel1()`
Returns the model providing the first run of entries.
`ListModel<E>`
`getModel2()`
Returns the model providing the second run of entries.
`int`
`getSize()`

### Methods inherited from class AbstractListModel

`addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ListModel2

public ListModel2(ListModel<E> model1, ListModel<E> model2)
Constructor.

Parameters:
  `model1` - first constituent model
  `model2` - second constituend model

## Method Details

### getModel1

public ListModel<E> getModel1()
Returns the model providing the first run of entries.

Returns:
  model 1

### getModel2

public ListModel<E> getModel2()
Returns the model providing the second run of entries.

Returns:
  model 2

### getElementAt

public E getElementAt(int ix)

### getSize

public int getSize()