/** * Checks if the direction can be treated as reversible. * @param direction1 direction to check * @return true if direction is REVERSIBLE or null, false otherwise */ private boolean isReversible(ConversionDirectionType direction1) { return direction1 == null || direction1.equals(ConversionDirectionType.REVERSIBLE); }
consensus = direction1; } else { consensus = direction1.equals(direction2) ? direction1 : null;
cnv.getConversionDirection().equals(direction) || cnv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE); Set<PhysicalEntity> input = direction.equals(ConversionDirectionType.RIGHT_TO_LEFT) ? cnv.getRight() : cnv.getLeft(); Set<PhysicalEntity> output = direction.equals(ConversionDirectionType.RIGHT_TO_LEFT) ? cnv.getLeft() : cnv.getRight();
Conversion conv = (Conversion) interaction; if (conv.getConversionDirection() == null || conv.getConversionDirection().equals(ConversionDirectionType.LEFT_TO_RIGHT) || (conv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE) && useTwoGlyphsForReversibleConversion)) { createProcessAndConnections(conv, ConversionDirectionType.LEFT_TO_RIGHT); } else if (conv.getConversionDirection() != null && (conv.getConversionDirection().equals(ConversionDirectionType.RIGHT_TO_LEFT) || (conv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE)) && useTwoGlyphsForReversibleConversion)) { createProcessAndConnections(conv, ConversionDirectionType.RIGHT_TO_LEFT); } else if (conv.getConversionDirection() != null && conv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE) && !useTwoGlyphsForReversibleConversion) { createProcessAndConnections(conv, ConversionDirectionType.REVERSIBLE);