Tabnine Logo
HashMap.ofEntries
Code IndexAdd Tabnine to your IDE (free)

How to use
ofEntries
method
in
javaslang.collection.HashMap

Best Java code snippets using javaslang.collection.HashMap.ofEntries (Showing top 7 results out of 315)

origin: org.immutables.javaslang/javaslang-encodings

@Encoding.Naming(value = "setEntries*")
@Encoding.Init
void setEntries(
 final Iterable<Tuple2<K, V>> entries)
{
 this.map = HashMap.ofEntries(entries);
}
origin: org.immutables.javaslang/javaslang-encodings

@Encoding.Naming(value = "setEntries*")
@Encoding.Init
void setEntries(
 final Iterable<Tuple2<K, V>> entries)
{
 this.map = HashMap.ofEntries(entries);
}
origin: com.io7m.smfj.jcanephora/io7m-smfj-jcanephora-core

public Builder setEntriesMappings(Iterable<Tuple2<SMFAttributeName, SMFArrayAttributeMapping>> entries) {
 this.mappings_map = HashMap.ofEntries(entries);
 return this;
}
origin: com.io7m.smfj/com.io7m.smfj.processing.api

public Builder setEntriesArrays(Iterable<Tuple2<SMFAttributeName, SMFAttributeArrayType>> entries) {
 this.arrays_map = HashMap.ofEntries(entries);
 return this;
}
origin: org.immutables.javaslang/javaslang-encodings

@Encoding.Naming(value = "setMap*")
@Encoding.Init
void setMap(
 final Map<K, V> in_map)
{
 this.map = HashMap.ofEntries(in_map.map(x -> x));
}
origin: com.io7m.smfj.jcanephora/io7m-smfj-jcanephora-tests

@Test
public void testDuplicate()
{
 final SMFArrayAttributeMapping m0 = SMFArrayAttributeMapping.of(
  SMFAttributeName.of("a"), 0, Optional.of(JCGLScalarType.TYPE_FLOAT), 4);
 final SMFArrayAttributeMapping m1 = SMFArrayAttributeMapping.of(
  SMFAttributeName.of("b"), 0, Optional.of(JCGLScalarType.TYPE_FLOAT), 4);
 this.expected.expect(IllegalArgumentException.class);
 SMFArrayObjectConfiguration.builder()
  .setMappings(HashMap.ofEntries(List.of(
   Tuple.of(SMFAttributeName.of("a"), m0),
   Tuple.of(SMFAttributeName.of("b"), m1))))
  .build();
}
origin: com.io7m.smfj.jcanephora/io7m-smfj-jcanephora-tests

 @Test
 public void testMappings()
 {
  final SMFArrayAttributeMapping m0 = SMFArrayAttributeMapping.of(
   SMFAttributeName.of("a"), 0, Optional.of(JCGLScalarType.TYPE_FLOAT), 4);
  final SMFArrayAttributeMapping m1 = SMFArrayAttributeMapping.of(
   SMFAttributeName.of("b"), 1, Optional.of(JCGLScalarType.TYPE_FLOAT), 4);

  final SMFArrayObjectConfiguration m =
   SMFArrayObjectConfiguration.builder()
    .setMappings(HashMap.ofEntries(List.of(
     Tuple.of(SMFAttributeName.of("a"), m0),
     Tuple.of(SMFAttributeName.of("b"), m1))))
    .setIndexBufferUsage(JCGLUsageHint.USAGE_DYNAMIC_COPY)
    .setArrayBufferUsage(JCGLUsageHint.USAGE_STREAM_READ)
    .build();

  Assert.assertEquals(JCGLUsageHint.USAGE_DYNAMIC_COPY, m.indexBufferUsage());
  Assert.assertEquals(JCGLUsageHint.USAGE_STREAM_READ, m.arrayBufferUsage());
  Assert.assertEquals(m0, m.mappings().get(SMFAttributeName.of("a")).get());
  Assert.assertEquals(m1, m.mappings().get(SMFAttributeName.of("b")).get());
  Assert.assertEquals(2L, (long) m.mappings().size());
 }
}
javaslang.collectionHashMapofEntries

Popular methods of HashMap

  • empty
  • ofAll
  • of
  • put
  • containsKey

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top plugins for WebStorm
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