public class DetailsConnectorChange extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static Comparator<DetailsConnectorChange> |
REMOVED_FIRST_COMPARATOR |
| Constructor and Description |
|---|
DetailsConnectorChange()
Create a new connector index change
|
DetailsConnectorChange(Connector connector,
Integer oldIndex,
Integer newIndex,
boolean shouldStillBeVisible)
Convenience constructor for setting all the fields in one line.
|
| Modifier and Type | Method and Description |
|---|---|
Connector |
getConnector()
Gets the changed connector.
|
Integer |
getNewIndex()
Gets the new index for the connector.
|
Integer |
getOldIndex()
Gets the old index for the connector.
|
boolean |
isShouldStillBeVisible()
Checks whether whether the details should remain open, even if connector
might be
null. |
void |
setConnector(Connector connector)
Sets the changed connector.
|
void |
setNewIndex(Integer newIndex)
Sets the new index
|
void |
setOldIndex(Integer oldIndex)
Sets the old index
|
void |
setShouldStillBeVisible(boolean shouldStillBeVisible)
Sets whether the details should remain open, even if connector might be
null. |
public static final Comparator<DetailsConnectorChange> REMOVED_FIRST_COMPARATOR
public DetailsConnectorChange()
public DetailsConnectorChange(Connector connector, Integer oldIndex, Integer newIndex, boolean shouldStillBeVisible)
Calling this constructor will also assert that the state of the pojo is consistent by internal assumptions.
connector - the changed connectoroldIndex - the old indexnewIndex - the new indexshouldStillBeVisible - details should be visible regardless of connectorpublic Integer getOldIndex()
If null, the connector is recently added. This means that
getConnector() is expected not to return null.
public Integer getNewIndex()
If null, the connector should be removed. This means that
getConnector() is expected to return null as well.
public Connector getConnector()
nullpublic void setConnector(Connector connector)
connector - the changed connector. May be nullpublic void setOldIndex(Integer oldIndex)
oldIndex - the old index. May be null if a new connector is
being insertedpublic void setNewIndex(Integer newIndex)
newIndex - the new index. May be null if a connector is
being removedpublic boolean isShouldStillBeVisible()
null.true iff the details should remain open, even if
connector might be nullpublic void setShouldStillBeVisible(boolean shouldStillBeVisible)
null.shouldStillBeVisible - true iff the details should remain open, even if
connector might be nullCopyright © 2016 Vaadin Ltd. All rights reserved.