Search in sources :

Example 1 with SavePolicy

use of org.cytoscape.model.SavePolicy in project cytoscape-impl by cytoscape.

the class CyTableImpl method swap.

@Override
public void swap(final CyTable otherTable) {
    synchronized (lock) {
        final CyTableImpl other = (CyTableImpl) otherTable;
        final Set<String> tempCurrentlyActiveAttributes = currentlyActiveAttributes;
        currentlyActiveAttributes = other.currentlyActiveAttributes;
        other.currentlyActiveAttributes = tempCurrentlyActiveAttributes;
        final Map<String, ColumnData> tempAttributes = attributes;
        attributes = other.attributes;
        other.attributes = tempAttributes;
        final Map<Object, CyRow> tempRows = rows;
        rows = other.rows;
        other.rows = tempRows;
        final Map<String, CyColumn> tempTypes = types;
        types = other.types;
        other.types = tempTypes;
        final ArrayList<CyColumn> tempListCol = colList;
        colList = other.colList;
        other.colList = tempListCol;
        final ArrayList<CyRow> tempListRow = rowList;
        rowList = other.rowList;
        other.rowList = tempListRow;
        final Map<String, String> tempNormalizedColNames = normalizedColumnNames;
        normalizedColumnNames = other.normalizedColumnNames;
        other.normalizedColumnNames = tempNormalizedColNames;
        final String tempTitle = title;
        title = other.title;
        other.title = tempTitle;
        final boolean tempPub = pub;
        pub = other.pub;
        other.pub = tempPub;
        final boolean tempIsImmutable = isImmutable;
        isImmutable = other.isImmutable;
        other.isImmutable = tempIsImmutable;
        final String tempPrimaryKey = primaryKey;
        primaryKey = other.primaryKey;
        other.primaryKey = tempPrimaryKey;
        final String tempLastInternalError = lastInternalError;
        lastInternalError = other.lastInternalError;
        other.lastInternalError = tempLastInternalError;
        final Map<String, VirtualColumn> tempVirtualColumnMap = virtualColumnMap;
        virtualColumnMap = other.virtualColumnMap;
        other.virtualColumnMap = tempVirtualColumnMap;
        final Map<String, Set<CyColumn>> tempDependents = dependents;
        dependents = other.dependents;
        other.dependents = tempDependents;
        final SavePolicy tempSavePolicy = savePolicy;
        savePolicy = other.savePolicy;
        other.savePolicy = tempSavePolicy;
    }
}
Also used : HashSet(java.util.HashSet) Set(java.util.Set) CyColumn(org.cytoscape.model.CyColumn) ColumnData(org.cytoscape.model.internal.column.ColumnData) CyRow(org.cytoscape.model.CyRow) SavePolicy(org.cytoscape.model.SavePolicy)

Aggregations

HashSet (java.util.HashSet)1 Set (java.util.Set)1 CyColumn (org.cytoscape.model.CyColumn)1 CyRow (org.cytoscape.model.CyRow)1 SavePolicy (org.cytoscape.model.SavePolicy)1 ColumnData (org.cytoscape.model.internal.column.ColumnData)1