- Common ways to obtain InteractionShortLabelGenerator$InteractionShortLabel
private void myMethod () {InteractionShortLabelGenerator$InteractionShortLabel i =
String completeLabel;new InteractionShortLabel(completeLabel)
String baitLabel;String preyLabel;Integer suffix;new InteractionShortLabel(baitLabel, preyLabel, suffix)
- Smart code suggestions by Codota
}
private void truncateLabelsIfNecessary() { while ( calculateLabelLength() > AnnotatedObject.MAX_SHORT_LABEL_LEN ) { int baitLength = baitLabel.length(); int preyLength = ( preyLabel == null ) ? 0 : preyLabel.length(); if ( baitLength > preyLength ) { baitLabel = baitLabel.substring( 0, baitLabel.length() - 1 ); // truncate, remove last charachter (from bait) } else { if ( preyLabel != null ) { preyLabel = preyLabel.substring( 0, preyLabel.length() - 1 ); // truncate, remove last charachter (from prey) } } } // while }
private void truncateLabelsIfNecessary() { while (calculateLabelLength() > AnnotatedObject.MAX_SHORT_LABEL_LEN) { int baitLength = baitLabel.length(); int preyLength = (preyLabel == null)? 0 : preyLabel.length(); if (baitLength > preyLength) { baitLabel = baitLabel.substring(0, baitLabel.length() - 1); // truncate, remove last charachter (from bait) } else { if (preyLabel != null) { preyLabel = preyLabel.substring(0, preyLabel.length() - 1); // truncate, remove last charachter (from prey) } } } // while }
private void truncateLabelsIfNecessary() { while ( calculateLabelLength() > AnnotatedObject.MAX_SHORT_LABEL_LEN ) { int baitLength = baitLabel.length(); int preyLength = ( preyLabel == null ) ? 0 : preyLabel.length(); if ( baitLength > preyLength ) { baitLabel = baitLabel.substring( 0, baitLabel.length() - 1 ); // truncate, remove last charachter (from bait) } else { if ( preyLabel != null ) { preyLabel = preyLabel.substring( 0, preyLabel.length() - 1 ); // truncate, remove last charachter (from prey) } } } // while }