Codota Logo
InteractionShortLabelGenerator$InteractionShortLabel.calculateLabelLength
Code IndexAdd Codota to your IDE (free)

How to use
calculateLabelLength
method
in
uk.ac.ebi.intact.model.util.InteractionShortLabelGenerator$InteractionShortLabel

Best Java code snippets using uk.ac.ebi.intact.model.util.InteractionShortLabelGenerator$InteractionShortLabel.calculateLabelLength (Showing top 3 results out of 315)

  • Common ways to obtain InteractionShortLabelGenerator$InteractionShortLabel
private void myMethod () {
InteractionShortLabelGenerator$InteractionShortLabel i =
  • Codota IconString completeLabel;new InteractionShortLabel(completeLabel)
  • Codota IconString baitLabel;String preyLabel;Integer suffix;new InteractionShortLabel(baitLabel, preyLabel, suffix)
  • Smart code suggestions by Codota
}
origin: uk.ac.ebi.intact.core/intact-core

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
}
origin: uk.ac.ebi.intact/intact-core

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
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

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
}
uk.ac.ebi.intact.model.utilInteractionShortLabelGenerator$InteractionShortLabelcalculateLabelLength

Popular methods of InteractionShortLabelGenerator$InteractionShortLabel

  • <init>
  • getCompleteLabel
  • getSuffix
  • isSelfInteraction
  • parse
    Interactions follow the nomenclature baitLabel-preyLabel-suffix (where suffix is optional integer).
  • prepareLabel
  • setSuffix
  • truncateLabelsIfNecessary

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getSystemService (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Notification (javax.management)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now