Tabnine Logo
ObjectIdentityOrdinalMap.getEntry
Code IndexAdd Tabnine to your IDE (free)

How to use
getEntry
method
in
com.netflix.hollow.zenoadapter.util.ObjectIdentityOrdinalMap

Best Java code snippets using com.netflix.hollow.zenoadapter.util.ObjectIdentityOrdinalMap.getEntry (Showing top 2 results out of 315)

origin: Netflix/hollow

public int add(String type, Object o) {
  ObjectIdentityOrdinalMap identityOrdinalMap = getIdentityOrdinalMap(type);
  Entry entry = identityOrdinalMap.getEntry(o);
  if(entry != null) {
    return entry.getOrdinal();
  }
  NFTypeSerializer<Object> serializer = getSerializer(type);
  int ordinal = add(type, o, serializer);
  identityOrdinalMap.put(o, ordinal);
  return ordinal;
}
origin: Netflix/hollow

@Test
public void test() {
  for(int i=0;i<obj.length;i++) {
    obj[i] = new Object();
  }
  ObjectIdentityOrdinalMap ordinalMap = new ObjectIdentityOrdinalMap();
  for(int i=0;i<obj.length;i++) {
    ordinalMap.put(obj[i], i);
  }
  for(int i=0;i<obj.length;i++) {
    Assert.assertEquals(ordinalMap.getEntry(obj[i]).getOrdinal(), i);
  }
}
com.netflix.hollow.zenoadapter.utilObjectIdentityOrdinalMapgetEntry

Popular methods of ObjectIdentityOrdinalMap

  • <init>
  • put
    Associating the obj with an ordinal
  • segment

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JTable (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top 12 Jupyter Notebook extensions
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