Tabnine Logo
TreeMap
Code IndexAdd Tabnine to your IDE (free)

How to use
TreeMap
in
javaslang.collection

Best Java code snippets using javaslang.collection.TreeMap (Showing top 20 results out of 315)

origin: com.io7m.smfj/com.io7m.smfj.bytebuffer

@Override
public void onStart()
{
 this.errors = List.empty();
 this.attr_buffers = TreeMap.empty();
 this.attr_packers = TreeMap.empty();
 this.mesh = null;
 this.header = null;
 this.tri_buffer = null;
 this.tri_packer = null;
}
origin: org.immutables.javaslang/javaslang-encodings

@Encoding.Naming(value = "setJavaMap*")
@Encoding.Init
void setJavaMap(
 final java.util.Map<K, V> in_map)
{
 this.map = TreeMap.ofAll(in_map);
}
origin: org.immutables.javaslang/javaslang-encodings

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

/**
 * @return The packed attributes by octet offset
 */
@Value.Derived
default SortedMap<Integer, SMFByteBufferPackedAttribute> packedAttributesByOffset()
{
 TreeMap<Integer, SMFByteBufferPackedAttribute> output = TreeMap.empty();
 final Seq<SMFAttribute> ordered = this.attributesOrdered();
 int offset = 0;
 for (int index = 0; index < ordered.size(); ++index) {
  final SMFAttribute attr = ordered.get(index);
  final SMFByteBufferPackedAttribute packed =
   SMFByteBufferPackedAttribute.of(attr, index, offset);
  output = output.put(Integer.valueOf(offset), packed);
  offset = Math.addExact(offset, attr.sizeOctets());
 }
 return output;
}
origin: org.immutables.javaslang/javaslang-encodings

@Encoding.Naming(standard = Encoding.StandardNaming.PUT)
@Encoding.Init
void put(
 final K key,
 final V value)
{
 this.map = this.map.put(key, value);
}
origin: com.io7m.smfj/com.io7m.smfj.bytebuffer

@Override
public Optional<SMFParserEventsDataAttributeValuesType> onDataAttributeStart(
 final SMFAttribute attribute)
{
 TreeMap<Integer, SMFByteBufferAttributePacker> packers = TreeMap.empty();
 final SMFAttributeName name = attribute.name();
 for (final Tuple2<Integer, SMFByteBufferPackingConfiguration> p : this.config) {
  final Integer id = p._1;
  final SMFByteBufferPackingConfiguration bc = p._2;
  final SortedMap<SMFAttributeName, SMFByteBufferPackedAttribute> by_name =
   bc.packedAttributesByName();
  if (by_name.containsKey(name)) {
   final ByteBuffer b = this.attr_buffers.get(id).get();
   final SMFByteBufferPackedAttribute pa = by_name.get(name).get();
   final SMFByteBufferAttributePacker packer =
    new SMFByteBufferAttributePacker(
     this,
     b,
     bc,
     pa,
     this.header.vertexCount());
   packers = packers.put(id, packer);
  }
 }
 this.attr_packers = packers;
 return Optional.of(this);
}
origin: org.immutables.javaslang/javaslang-encodings

@Encoding.Naming(value = "putEntry*", depluralize = true)
@Encoding.Init
void putEntry(
 final Tuple2<K, V> entry)
{
 this.map = this.map.put(entry);
}
origin: org.immutables.javaslang/javaslang-encodings

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

@Encoding.Naming(value = "setJavaMap*")
@Encoding.Init
void setJavaMap(
 final java.util.Map<K, V> in_map)
{
 this.map = TreeMap.ofAll(in_map);
}
origin: com.io7m.smfj/io7m-smfj-core

/**
 * @return The attributes by name
 */
@Value.Derived
default SortedMap<SMFAttributeName, SMFAttribute> attributesByName()
{
 SortedMap<SMFAttributeName, SMFAttribute> m = TreeMap.empty();
 final List<SMFAttribute> ordered = this.attributesInOrder();
 for (int index = 0; index < ordered.size(); ++index) {
  final SMFAttribute attr = ordered.get(index);
  if (m.containsKey(attr.name())) {
   final StringBuilder sb = new StringBuilder(128);
   sb.append("Duplicate attribute name.");
   sb.append(System.lineSeparator());
   sb.append("  Attribute: ");
   sb.append(attr.name().value());
   sb.append(System.lineSeparator());
   throw new IllegalArgumentException(sb.toString());
  }
  m = m.put(attr.name(), attr);
 }
 return m;
}
origin: com.io7m.smfj/io7m-smfj-validation-api

public Builder setEntriesRequiredAttributes(Iterable<Tuple2<SMFAttributeName, SMFSchemaAttribute>> entries) {
 this.requiredAttributes_map = TreeMap.ofEntries(entries);
 return this;
}
origin: com.io7m.smfj/io7m-smfj-validation-api

public Builder setJavaMapRequiredAttributes(Map<SMFAttributeName, SMFSchemaAttribute> in_map) {
 this.requiredAttributes_map = TreeMap.ofAll(in_map);
 return this;
}
origin: com.io7m.smfj/com.io7m.smfj.core

/**
 * @return The attributes by name
 */
@Value.Derived
default SortedMap<SMFAttributeName, SMFAttribute> attributesByName()
{
 SortedMap<SMFAttributeName, SMFAttribute> m = TreeMap.empty();
 final List<SMFAttribute> ordered = this.attributesInOrder();
 for (int index = 0; index < ordered.size(); ++index) {
  final SMFAttribute attr = ordered.get(index);
  if (m.containsKey(attr.name())) {
   final StringBuilder sb = new StringBuilder(128);
   sb.append("Duplicate attribute name.");
   sb.append(System.lineSeparator());
   sb.append("  Attribute: ");
   sb.append(attr.name().value());
   sb.append(System.lineSeparator());
   throw new IllegalArgumentException(sb.toString());
  }
  m = m.put(attr.name(), attr);
 }
 return m;
}
origin: com.io7m.smfj/com.io7m.smfj.validation.api

public Builder setEntriesOptionalAttributes(Iterable<Tuple2<SMFAttributeName, SMFSchemaAttribute>> entries) {
 this.optionalAttributes_map = TreeMap.ofEntries(entries);
 return this;
}
origin: com.io7m.smfj/io7m-smfj-validation-api

public Builder setJavaMapOptionalAttributes(Map<SMFAttributeName, SMFSchemaAttribute> in_map) {
 this.optionalAttributes_map = TreeMap.ofAll(in_map);
 return this;
}
origin: com.io7m.smfj/com.io7m.smfj.processing.api

/**
 * @return A module resolver
 */
public static SMFFilterCommandModuleResolverType create()
{
 SortedMap<String, SMFFilterCommandModuleType> modules =
  TreeMap.empty();
 final ServiceLoader<SMFFilterCommandModuleProviderType> providers =
  ServiceLoader.load(SMFFilterCommandModuleProviderType.class);
 final Iterator<SMFFilterCommandModuleProviderType> iter = providers.iterator();
 while (iter.hasNext()) {
  final SMFFilterCommandModuleProviderType provider = iter.next();
  final SortedMap<String, SMFFilterCommandModuleType> available =
   provider.available();
  for (final String name : available.keySet()) {
   final SMFFilterCommandModuleType module = available.get(name).get();
   if (modules.containsKey(name)) {
    LOG.warn("multiple modules with the same name: {}", name);
   }
   if (LOG.isDebugEnabled()) {
    LOG.debug("registered module {} via provider {}", name, provider);
   }
   modules = modules.put(name, module);
  }
 }
 return new SMFFilterCommandModuleResolver(modules);
}
origin: com.io7m.smfj/io7m-smfj-validation-api

public Builder setEntriesOptionalAttributes(Iterable<Tuple2<SMFAttributeName, SMFSchemaAttribute>> entries) {
 this.optionalAttributes_map = TreeMap.ofEntries(entries);
 return this;
}
origin: com.io7m.smfj/com.io7m.smfj.validation.api

public Builder setJavaMapRequiredAttributes(Map<SMFAttributeName, SMFSchemaAttribute> in_map) {
 this.requiredAttributes_map = TreeMap.ofAll(in_map);
 return this;
}
origin: com.io7m.smfj/com.io7m.smfj.processing.api

protected SMFFilterCommandModuleProviderAbstract(
 final SMFFilterCommandModuleType... in_modules)
{
 NullCheck.notNull(in_modules, "Modules");
 SortedMap<String, SMFFilterCommandModuleType> m = TreeMap.empty();
 for (int index = 0; index < in_modules.length; ++index) {
  final SMFFilterCommandModuleType module = in_modules[index];
  if (m.containsKey(module.name())) {
   throw new IllegalArgumentException(
    "Duplicate published module: " + module.name());
  }
  m = m.put(module.name(), module);
 }
 this.available = m;
}
origin: com.io7m.smfj/com.io7m.smfj.validation.api

public Builder setEntriesRequiredAttributes(Iterable<Tuple2<SMFAttributeName, SMFSchemaAttribute>> entries) {
 this.requiredAttributes_map = TreeMap.ofEntries(entries);
 return this;
}
javaslang.collectionTreeMap

Most used methods

  • empty
  • ofAll
  • ofEntries
  • put

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • 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