long addBarrierNode ( long nodeId ) { ReaderNode newNode ; int graphIndex = getNodeMap ( ) . get ( nodeId ) ; if ( graphIndex < TOWER_NODE ) { graphIndex = - graphIndex - 3 ; newNode = new ReaderNode ( createNewNodeId ( ) , nodeAccess , graphIndex ) ; } else { graphIndex = graphIndex - 3 ; newNode = new ReaderNode ( createNewNodeId ( ) , pillarInfo , graphIndex ) ; } final long id = newNode . getId ( ) ; prepareHighwayNode ( id ) ; addNode ( newNode ) ; return id ; }
Create a copy of the barrier node