code: public void getContractionsAndExpansions(UnicodeSet contractions, UnicodeSet expansions, boolean addPrefixes)
              throws Exception {
          if (contractions != null) {
              contractions.clear();
          }
          if (expansions != null) {
              expansions.clear();
          }
          new ContractionsAndExpansions(contractions, expansions, null, addPrefixes).forData(data);
      }
docs: Gets unicode sets containing contractions and/or expansions of a collator
  
  @param contractions
  if not null, set to contain contractions
  @param expansions
  if not null, set to contain expansions
  @param addPrefixes
  add the prefix contextual elements to contractions
  @throws Exception
  Throws an exception if any errors occurs.