congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HollowSetTypeDataAccess.ordinalIterator
Code IndexAdd Tabnine to your IDE (free)

How to use
ordinalIterator
method
in
com.netflix.hollow.core.read.dataaccess.HollowSetTypeDataAccess

Best Java code snippets using com.netflix.hollow.core.read.dataaccess.HollowSetTypeDataAccess.ordinalIterator (Showing top 6 results out of 315)

origin: Netflix/hollow

@Override
public HollowOrdinalIterator iterator(int ordinal) {
  return dataAccess.ordinalIterator(ordinal);
}
origin: Netflix/hollow

public HollowOrdinalIterator getOrdinalIterator(int ordinal) {
  return getTypeDataAccess().ordinalIterator(ordinal);
}
origin: Netflix/hollow

private void appendSetStringify(Writer writer, HollowDataAccess dataAccess,
    HollowSetTypeDataAccess typeDataAccess, int ordinal, int indentation) throws IOException {
  HollowSetSchema schema = typeDataAccess.getSchema();
  if(showTypes)
    writer.append("(").append(schema.getName()).append(")");
  if(showOrdinals)
    writer.append(" (ordinal ").append(Integer.toString(ordinal)).append(")");
  indentation++;
  String elementType = schema.getElementType();
  HollowOrdinalIterator iter = typeDataAccess.ordinalIterator(ordinal);
  int elementOrdinal = iter.next();
  while(elementOrdinal != NO_MORE_ORDINALS) {
    writer.append(NEWLINE);
    appendIndentation(writer, indentation);
    writer.append("e: ");
    appendStringify(writer, dataAccess, elementType, elementOrdinal, indentation);
    elementOrdinal = iter.next();
  }
}
origin: Netflix/hollow

private void appendSetStringify(Writer writer, HollowDataAccess dataAccess, HollowSetTypeDataAccess typeDataAccess, int ordinal, int indentation) throws IOException {
  HollowSetSchema schema = typeDataAccess.getSchema();
  indentation++;
  String elementType = schema.getElementType();
  HollowOrdinalIterator iter = typeDataAccess.ordinalIterator(ordinal);
  int elementOrdinal = iter.next();
  if(elementOrdinal == HollowOrdinalIterator.NO_MORE_ORDINALS) {
    writer.append("[]");
  } else {
    boolean firstElement = true;
    writer.append("[");
    if(prettyPrint)
      writer.append(NEWLINE);
    while(elementOrdinal != HollowOrdinalIterator.NO_MORE_ORDINALS) {
      if(firstElement)
        firstElement = false;
      else
        writer.append(",");
      if(prettyPrint)
        appendIndentation(writer, indentation);
      appendStringify(writer, dataAccess, elementType, elementOrdinal, indentation);
      elementOrdinal = iter.next();
    }
    if(prettyPrint) {
      writer.append(NEWLINE);
      appendIndentation(writer, indentation - 1);
    }
    writer.append("]");
  }
}
origin: Netflix/hollow

@Override
public HollowOrdinalIterator ordinalIterator(int ordinal) {
  sampler().recordIterator();
  recordStackTrace();
  if(!ordinalIsPresent(ordinal))
    return ((HollowSetTypeDataAccess)dataAccess.getTypeDataAccess(getSchema().getName(), ordinal)).ordinalIterator(ordinal);
  return removedRecords().ordinalIterator(getMappedOrdinal(ordinal));
}
origin: Netflix/hollow

@Override
public boolean contains(HollowSet<T> set, int ordinal, Object o) {
  HollowOrdinalIterator iter;
  
  if(getSchema().getHashKey() != null) {
    iter = dataAccess.ordinalIterator(ordinal);
  } else {
    int hashCode = dataAccess.getDataAccess().getHashCodeFinder().hashCode(o);
    iter = dataAccess.potentialMatchOrdinalIterator(ordinal, hashCode);
  }
  int potentialOrdinal = iter.next();
  while(potentialOrdinal != HollowOrdinalIterator.NO_MORE_ORDINALS) {
    if(set.equalsElement(potentialOrdinal, o))
      return true;
    potentialOrdinal = iter.next();
  }
  return false;
}

com.netflix.hollow.core.read.dataaccessHollowSetTypeDataAccessordinalIterator

Popular methods of HollowSetTypeDataAccess

  • contains
    Generally, the method #findElement(int,Object...) may be more useful.
  • potentialMatchOrdinalIterator
  • size
  • findElement
    Returns The matching ordinal of the element from the set at the specified ordinal which matches the
  • getDataAccess
  • getSchema
  • relativeBucketValue

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JLabel (javax.swing)
  • JList (javax.swing)
  • From CI to AI: The AI layer in your organization
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