Tabnine Logo
UTF32ToUTF8$UTF8Sequence
Code IndexAdd Tabnine to your IDE (free)

How to use
UTF32ToUTF8$UTF8Sequence
in
org.apache.lucene.util.automaton

Best Java code snippets using org.apache.lucene.util.automaton.UTF32ToUTF8$UTF8Sequence (Showing top 16 results out of 315)

origin: harbby/presto-connectors

private void build(int start, int end, UTF8Sequence startUTF8, UTF8Sequence endUTF8, int upto) {
 if (startUTF8.byteAt(upto) == endUTF8.byteAt(upto)) {
   utf8.addTransition(start, end, startUTF8.byteAt(upto), endUTF8.byteAt(upto));
   return;
  } else {
   utf8.addTransition(start, n, startUTF8.byteAt(upto));
  if (upto == startUTF8.len-1) {
   utf8.addTransition(start, end, startUTF8.byteAt(upto), endUTF8.byteAt(upto));
  } else {
   start(start, end, startUTF8, upto, false);
   if (endUTF8.byteAt(upto) - startUTF8.byteAt(upto) > 1) {
    all(start, end, startUTF8.byteAt(upto)+1, endUTF8.byteAt(upto)-1, startUTF8.len-upto-1);
   tmpUTF8b.set(endCodes[byteCount-1]);
   all(start, end,
     tmpUTF8a.byteAt(0),
     tmpUTF8b.byteAt(0),
     tmpUTF8a.len - 1);
   byteCount++;
origin: harbby/presto-connectors

private void end(int start, int end, UTF8Sequence endUTF8, int upto, boolean doAll) {
 if (upto == endUTF8.len-1) {
  // Done recursing
  //start.addTransition(new Transition(endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]), endUTF8.byteAt(upto), end));   // type=end
  utf8.addTransition(start, end, endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]), endUTF8.byteAt(upto));
 } else {
  final int startCode;
  if (endUTF8.numBits(upto) == 5) {
   // special case -- avoid created unused edges (endUTF8
   // doesn't accept certain byte sequences) -- there
   // are other cases we could optimize too:
   startCode = 194;
  } else {
   startCode = endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]);
  }
  if (doAll && endUTF8.byteAt(upto) != startCode) {
   all(start, end, startCode, endUTF8.byteAt(upto)-1, endUTF8.len-upto-1);
  }
  int n = utf8.createState();
  //start.addTransition(new Transition(endUTF8.byteAt(upto), n));  // type=end
  utf8.addTransition(start, n, endUTF8.byteAt(upto));
  end(n, end, endUTF8, 1+upto, true);
 }
}
origin: harbby/presto-connectors

private void set(int code) {
 if (code < 128) {
  // 0xxxxxxx
  bytes[0].value = code;
  bytes[0].bits = 7;
  len = 1;
 } else if (code < 2048) {
  // 110yyyxx 10xxxxxx
  bytes[0].value = (6 << 5) | (code >> 6);
  bytes[0].bits = 5;
  setRest(code, 1);
  len = 2;
 } else if (code < 65536) {
  // 1110yyyy 10yyyyxx 10xxxxxx
  bytes[0].value = (14 << 4) | (code >> 12);
  bytes[0].bits = 4;
  setRest(code, 2);
  len = 3;
 } else {
  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  bytes[0].value = (30 << 3) | (code >> 18);
  bytes[0].bits = 3;
  setRest(code, 3);
  len = 4;
 }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

private void build(int start, int end, UTF8Sequence startUTF8, UTF8Sequence endUTF8, int upto) {
 if (startUTF8.byteAt(upto) == endUTF8.byteAt(upto)) {
   utf8.addTransition(start, end, startUTF8.byteAt(upto), endUTF8.byteAt(upto));
   return;
  } else {
   utf8.addTransition(start, n, startUTF8.byteAt(upto));
  if (upto == startUTF8.len-1) {
   utf8.addTransition(start, end, startUTF8.byteAt(upto), endUTF8.byteAt(upto));
  } else {
   start(start, end, startUTF8, upto, false);
   if (endUTF8.byteAt(upto) - startUTF8.byteAt(upto) > 1) {
    all(start, end, startUTF8.byteAt(upto)+1, endUTF8.byteAt(upto)-1, startUTF8.len-upto-1);
   tmpUTF8b.set(endCodes[byteCount-1]);
   all(start, end,
     tmpUTF8a.byteAt(0),
     tmpUTF8b.byteAt(0),
     tmpUTF8a.len - 1);
   byteCount++;
origin: org.infinispan/infinispan-embedded-query

private void build(int start, int end, UTF8Sequence startUTF8, UTF8Sequence endUTF8, int upto) {
 if (startUTF8.byteAt(upto) == endUTF8.byteAt(upto)) {
   utf8.addTransition(start, end, startUTF8.byteAt(upto), endUTF8.byteAt(upto));
   return;
  } else {
   utf8.addTransition(start, n, startUTF8.byteAt(upto));
  if (upto == startUTF8.len-1) {
   utf8.addTransition(start, end, startUTF8.byteAt(upto), endUTF8.byteAt(upto));
  } else {
   start(start, end, startUTF8, upto, false);
   if (endUTF8.byteAt(upto) - startUTF8.byteAt(upto) > 1) {
    all(start, end, startUTF8.byteAt(upto)+1, endUTF8.byteAt(upto)-1, startUTF8.len-upto-1);
   tmpUTF8b.set(endCodes[byteCount-1]);
   all(start, end,
     tmpUTF8a.byteAt(0),
     tmpUTF8b.byteAt(0),
     tmpUTF8a.len - 1);
   byteCount++;
origin: org.infinispan/infinispan-embedded-query

private void set(int code) {
 if (code < 128) {
  // 0xxxxxxx
  bytes[0].value = code;
  bytes[0].bits = 7;
  len = 1;
 } else if (code < 2048) {
  // 110yyyxx 10xxxxxx
  bytes[0].value = (6 << 5) | (code >> 6);
  bytes[0].bits = 5;
  setRest(code, 1);
  len = 2;
 } else if (code < 65536) {
  // 1110yyyy 10yyyyxx 10xxxxxx
  bytes[0].value = (14 << 4) | (code >> 12);
  bytes[0].bits = 4;
  setRest(code, 2);
  len = 3;
 } else {
  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  bytes[0].value = (30 << 3) | (code >> 18);
  bytes[0].bits = 3;
  setRest(code, 3);
  len = 4;
 }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

private void end(int start, int end, UTF8Sequence endUTF8, int upto, boolean doAll) {
 if (upto == endUTF8.len-1) {
  // Done recursing
  //start.addTransition(new Transition(endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]), endUTF8.byteAt(upto), end));   // type=end
  utf8.addTransition(start, end, endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]), endUTF8.byteAt(upto));
 } else {
  final int startCode;
  if (endUTF8.numBits(upto) == 5) {
   // special case -- avoid created unused edges (endUTF8
   // doesn't accept certain byte sequences) -- there
   // are other cases we could optimize too:
   startCode = 194;
  } else {
   startCode = endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]);
  }
  if (doAll && endUTF8.byteAt(upto) != startCode) {
   all(start, end, startCode, endUTF8.byteAt(upto)-1, endUTF8.len-upto-1);
  }
  int n = utf8.createState();
  //start.addTransition(new Transition(endUTF8.byteAt(upto), n));  // type=end
  utf8.addTransition(start, n, endUTF8.byteAt(upto));
  end(n, end, endUTF8, 1+upto, true);
 }
}
origin: org.infinispan/infinispan-embedded-query

private void end(int start, int end, UTF8Sequence endUTF8, int upto, boolean doAll) {
 if (upto == endUTF8.len-1) {
  // Done recursing
  //start.addTransition(new Transition(endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]), endUTF8.byteAt(upto), end));   // type=end
  utf8.addTransition(start, end, endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]), endUTF8.byteAt(upto));
 } else {
  final int startCode;
  if (endUTF8.numBits(upto) == 5) {
   // special case -- avoid created unused edges (endUTF8
   // doesn't accept certain byte sequences) -- there
   // are other cases we could optimize too:
   startCode = 194;
  } else {
   startCode = endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]);
  }
  if (doAll && endUTF8.byteAt(upto) != startCode) {
   all(start, end, startCode, endUTF8.byteAt(upto)-1, endUTF8.len-upto-1);
  }
  int n = utf8.createState();
  //start.addTransition(new Transition(endUTF8.byteAt(upto), n));  // type=end
  utf8.addTransition(start, n, endUTF8.byteAt(upto));
  end(n, end, endUTF8, 1+upto, true);
 }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

private void set(int code) {
 if (code < 128) {
  // 0xxxxxxx
  bytes[0].value = code;
  bytes[0].bits = 7;
  len = 1;
 } else if (code < 2048) {
  // 110yyyxx 10xxxxxx
  bytes[0].value = (6 << 5) | (code >> 6);
  bytes[0].bits = 5;
  setRest(code, 1);
  len = 2;
 } else if (code < 65536) {
  // 1110yyyy 10yyyyxx 10xxxxxx
  bytes[0].value = (14 << 4) | (code >> 12);
  bytes[0].bits = 4;
  setRest(code, 2);
  len = 3;
 } else {
  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  bytes[0].value = (30 << 3) | (code >> 18);
  bytes[0].bits = 3;
  setRest(code, 3);
  len = 4;
 }
}
origin: org.infinispan/infinispan-embedded-query

private void start(int start, int end, UTF8Sequence startUTF8, int upto, boolean doAll) {
 if (upto == startUTF8.len-1) {
  // Done recursing
  utf8.addTransition(start, end, startUTF8.byteAt(upto), startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1]); // type=start
  //start.addTransition(new Transition(startUTF8.byteAt(upto), startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1], end));  // type=start
 } else {
  int n = utf8.createState();
  utf8.addTransition(start, n, startUTF8.byteAt(upto));
  //start.addTransition(new Transition(startUTF8.byteAt(upto), n));  // type=start
  start(n, end, startUTF8, 1+upto, true);
  int endCode = startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1];
  if (doAll && startUTF8.byteAt(upto) != endCode) {
   all(start, end, startUTF8.byteAt(upto)+1, endCode, startUTF8.len-upto-1);
  }
 }
}
origin: harbby/presto-connectors

private void start(int start, int end, UTF8Sequence startUTF8, int upto, boolean doAll) {
 if (upto == startUTF8.len-1) {
  // Done recursing
  utf8.addTransition(start, end, startUTF8.byteAt(upto), startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1]); // type=start
  //start.addTransition(new Transition(startUTF8.byteAt(upto), startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1], end));  // type=start
 } else {
  int n = utf8.createState();
  utf8.addTransition(start, n, startUTF8.byteAt(upto));
  //start.addTransition(new Transition(startUTF8.byteAt(upto), n));  // type=start
  start(n, end, startUTF8, 1+upto, true);
  int endCode = startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1];
  if (doAll && startUTF8.byteAt(upto) != endCode) {
   all(start, end, startUTF8.byteAt(upto)+1, endCode, startUTF8.len-upto-1);
  }
 }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

private void start(int start, int end, UTF8Sequence startUTF8, int upto, boolean doAll) {
 if (upto == startUTF8.len-1) {
  // Done recursing
  utf8.addTransition(start, end, startUTF8.byteAt(upto), startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1]); // type=start
  //start.addTransition(new Transition(startUTF8.byteAt(upto), startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1], end));  // type=start
 } else {
  int n = utf8.createState();
  utf8.addTransition(start, n, startUTF8.byteAt(upto));
  //start.addTransition(new Transition(startUTF8.byteAt(upto), n));  // type=start
  start(n, end, startUTF8, 1+upto, true);
  int endCode = startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1];
  if (doAll && startUTF8.byteAt(upto) != endCode) {
   all(start, end, startUTF8.byteAt(upto)+1, endCode, startUTF8.len-upto-1);
  }
 }
}
origin: org.apache.lucene/lucene-core

private void build(int start, int end, UTF8Sequence startUTF8, UTF8Sequence endUTF8, int upto) {
 if (startUTF8.byteAt(upto) == endUTF8.byteAt(upto)) {
   utf8.addTransition(start, end, startUTF8.byteAt(upto), endUTF8.byteAt(upto));
   return;
  } else {
   utf8.addTransition(start, n, startUTF8.byteAt(upto));
  if (upto == startUTF8.len-1) {
   utf8.addTransition(start, end, startUTF8.byteAt(upto), endUTF8.byteAt(upto));
  } else {
   start(start, end, startUTF8, upto, false);
   if (endUTF8.byteAt(upto) - startUTF8.byteAt(upto) > 1) {
    all(start, end, startUTF8.byteAt(upto)+1, endUTF8.byteAt(upto)-1, startUTF8.len-upto-1);
   tmpUTF8b.set(endCodes[byteCount-1]);
   all(start, end,
     tmpUTF8a.byteAt(0),
     tmpUTF8b.byteAt(0),
     tmpUTF8a.len - 1);
   byteCount++;
origin: org.apache.lucene/lucene-core

private void set(int code) {
 if (code < 128) {
  // 0xxxxxxx
  bytes[0].value = code;
  bytes[0].bits = 7;
  len = 1;
 } else if (code < 2048) {
  // 110yyyxx 10xxxxxx
  bytes[0].value = (6 << 5) | (code >> 6);
  bytes[0].bits = 5;
  setRest(code, 1);
  len = 2;
 } else if (code < 65536) {
  // 1110yyyy 10yyyyxx 10xxxxxx
  bytes[0].value = (14 << 4) | (code >> 12);
  bytes[0].bits = 4;
  setRest(code, 2);
  len = 3;
 } else {
  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  bytes[0].value = (30 << 3) | (code >> 18);
  bytes[0].bits = 3;
  setRest(code, 3);
  len = 4;
 }
}
origin: org.apache.lucene/lucene-core

private void end(int start, int end, UTF8Sequence endUTF8, int upto, boolean doAll) {
 if (upto == endUTF8.len-1) {
  // Done recursing
  //start.addTransition(new Transition(endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]), endUTF8.byteAt(upto), end));   // type=end
  utf8.addTransition(start, end, endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]), endUTF8.byteAt(upto));
 } else {
  final int startCode;
  if (endUTF8.numBits(upto) == 5) {
   // special case -- avoid created unused edges (endUTF8
   // doesn't accept certain byte sequences) -- there
   // are other cases we could optimize too:
   startCode = 194;
  } else {
   startCode = endUTF8.byteAt(upto) & (~MASKS[endUTF8.numBits(upto)-1]);
  }
  if (doAll && endUTF8.byteAt(upto) != startCode) {
   all(start, end, startCode, endUTF8.byteAt(upto)-1, endUTF8.len-upto-1);
  }
  int n = utf8.createState();
  //start.addTransition(new Transition(endUTF8.byteAt(upto), n));  // type=end
  utf8.addTransition(start, n, endUTF8.byteAt(upto));
  end(n, end, endUTF8, 1+upto, true);
 }
}
origin: org.apache.lucene/lucene-core

private void start(int start, int end, UTF8Sequence startUTF8, int upto, boolean doAll) {
 if (upto == startUTF8.len-1) {
  // Done recursing
  utf8.addTransition(start, end, startUTF8.byteAt(upto), startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1]); // type=start
  //start.addTransition(new Transition(startUTF8.byteAt(upto), startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1], end));  // type=start
 } else {
  int n = utf8.createState();
  utf8.addTransition(start, n, startUTF8.byteAt(upto));
  //start.addTransition(new Transition(startUTF8.byteAt(upto), n));  // type=start
  start(n, end, startUTF8, 1+upto, true);
  int endCode = startUTF8.byteAt(upto) | MASKS[startUTF8.numBits(upto)-1];
  if (doAll && startUTF8.byteAt(upto) != endCode) {
   all(start, end, startUTF8.byteAt(upto)+1, endCode, startUTF8.len-upto-1);
  }
 }
}
org.apache.lucene.util.automatonUTF32ToUTF8$UTF8Sequence

Most used methods

  • byteAt
  • numBits
  • setRest

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JLabel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now