接口 TLBSentence

所有超级接口:
Sentence

public interface TLBSentence extends Sentence
Target label data in pairs of target IDs and target labels. Example:
$RATLB,3,SHIPTHREE,5,SHIPFIVE,99,SHIP99*1F
作者:
Joshua Sweaney
  • 方法详细资料

    • getTargetIds

      int[] getTargetIds()
      Get the list of target IDs listed in this sentence. The nth array element returned by this method, corresponds to the nth array element returned by getTargetLabels().
      返回:
      targets IDs as int array
      抛出:
      DataNotAvailableException - If the data is not available.
      ParseException - If the field contains unexpected or illegal value.
    • getTargetLabels

      String[] getTargetLabels()
      Get the list of target labels listed in this sentence. The nth array element returned by this method, corresponds to the nth array element returned by getTargetIds().
      返回:
      target labels as String array
      抛出:
      DataNotAvailableException - If the data is not available.
      ParseException - If the field contains unexpected or illegal value.
    • addTargetLabel

      void addTargetLabel(int targetId, String targetLabel)
      Adds a target (id,label) pair to this sentence.
      参数:
      targetId - int The target ID of the pair
      targetLabel - String The label of the pair
    • setTargetPairs

      void setTargetPairs(int[] targetIds, String[] targetLabels)
      Sets the target (id,label) pairs in this sentence. The size of each array must be identical. The nth position in each array corresponds to the nth position in the other array.
      参数:
      targetIds - array of target IDs
      targetLabels - array of target labels
      抛出:
      IllegalArgumentException - If array sizes are not the same