Tabnine Logo
CollectionsExt.compact
Code IndexAdd Tabnine to your IDE (free)

How to use
compact
method
in
org.apache.sis.internal.util.CollectionsExt

Best Java code snippets using org.apache.sis.internal.util.CollectionsExt.compact (Showing top 12 results out of 315)

origin: org.apache.sis.core/sis-referencing

/**
 * Constructs a factory with the given default properties.
 * {@code GeodeticObjectFactory} will fallback on the map given to this constructor for any property
 * not present in the map provided to a {@code createFoo(Map<String,?>, …)} method.
 *
 * @param  properties  the default properties, or {@code null} if none.
 */
public GeodeticObjectFactory(Map<String,?> properties) {
  if (properties == null || properties.isEmpty()) {
    properties = Collections.emptyMap();
  } else {
    properties = CollectionsExt.compact(new HashMap<>(properties));
  }
  defaultProperties = properties;
  pool = new WeakHashSet<>(AbstractIdentifiedObject.class);
  parser = new AtomicReference<>();
}
origin: apache/sis

/**
 * Constructs a factory with the given default properties.
 * {@code GeodeticObjectFactory} will fallback on the map given to this constructor for any property
 * not present in the map provided to a {@code createFoo(Map<String,?>, …)} method.
 *
 * @param  properties  the default properties, or {@code null} if none.
 */
public GeodeticObjectFactory(Map<String,?> properties) {
  if (properties == null || properties.isEmpty()) {
    properties = Collections.emptyMap();
  } else {
    properties = CollectionsExt.compact(new HashMap<>(properties));
  }
  defaultProperties = properties;
  pool = new WeakHashSet<>(AbstractIdentifiedObject.class);
  parser = new AtomicReference<>();
}
origin: org.apache.sis.storage/sis-gdal

/**
 * Creates a new {@literal Proj.4} factory. The {@code properties} argument is an optional map
 * for specifying common properties shared by the objects to create. Some available properties are
 * {@linkplain org.apache.sis.referencing.AbstractIdentifiedObject#AbstractIdentifiedObject(Map) listed there}.
 * Unknown properties, or properties that do not apply, or properties for which {@code Proj4Factory} supplies
 * itself a value, are ignored.
 *
 * @param properties  common properties for the objects to create, or {@code null} if none.
 */
public Proj4Factory(Map<String,?> properties) {
  properties   = new HashMap(properties != null ? properties : Collections.emptyMap());
  crsFactory   = factory(CRSFactory.class,           properties, ReferencingServices.CRS_FACTORY);
  csFactory    = factory(CSFactory.class,            properties, ReferencingServices.CS_FACTORY);
  datumFactory = factory(DatumFactory.class,         properties, ReferencingServices.DATUM_FACTORY);
  mtFactory    = factory(MathTransformFactory.class, properties, ReferencingServices.MT_FACTORY);
  defaultProperties = CollectionsExt.compact(properties);
}
origin: apache/sis

/**
 * Creates a new {@literal Proj.4} factory. The {@code properties} argument is an optional map
 * for specifying common properties shared by the objects to create. Some available properties are
 * {@linkplain org.apache.sis.referencing.AbstractIdentifiedObject#AbstractIdentifiedObject(Map) listed there}.
 * Unknown properties, or properties that do not apply, or properties for which {@code Proj4Factory} supplies
 * itself a value, are ignored.
 *
 * @param properties  common properties for the objects to create, or {@code null} if none.
 */
public Proj4Factory(Map<String,?> properties) {
  properties   = new HashMap<>(properties != null ? properties : Collections.emptyMap());
  crsFactory   = factory(CRSFactory.class,           properties, ReferencingServices.CRS_FACTORY);
  csFactory    = factory(CSFactory.class,            properties, ReferencingServices.CS_FACTORY);
  datumFactory = factory(DatumFactory.class,         properties, ReferencingServices.DATUM_FACTORY);
  mtFactory    = factory(MathTransformFactory.class, properties, ReferencingServices.MT_FACTORY);
  defaultProperties = CollectionsExt.compact(properties);
}
origin: apache/sis

properties = CollectionsExt.compact(properties);
origin: org.apache.sis.core/sis-referencing

properties = CollectionsExt.compact(properties);
origin: apache/sis

this.indices = CollectionsExt.compact(indices);
origin: apache/sis

m.replaceAll((k, v) -> CollectionsExt.compact(v));
return m;
origin: org.apache.sis.core/sis-feature

this.indices = CollectionsExt.compact(indices);
origin: apache/sis

columns = CollectionsExt.compact(m);
origin: apache/sis

byName       = CollectionsExt.compact(byName);
indices      = CollectionsExt.compact(indices);
assignableTo = CollectionsExt.unmodifiableOrCopy(assignableTo);
origin: org.apache.sis.core/sis-feature

byName       = CollectionsExt.compact(byName);
indices      = CollectionsExt.compact(indices);
assignableTo = CollectionsExt.unmodifiableOrCopy(assignableTo);
org.apache.sis.internal.utilCollectionsExtcompact

Javadoc

Returns a more compact representation of the given list. This method is similar to #unmodifiableOrCopy(List) except that it does not wrap the list in an unmodifiable view. The intend is to avoid one level of indirection for performance and memory reasons. This is okay only if the list is kept in a private field and never escape outside that class.

Popular methods of CollectionsExt

  • singletonOrEmpty
    Returns the given value as a singleton if non-null, or returns an empty set otherwise.
  • unmodifiableOrCopy
    Returns a unmodifiable version of the given set. This method is different than the standard Collecti
  • addToMultiValuesMap
    Adds a value in a pseudo multi-values map. The multi-values map is simulated by a map of lists. The
  • first
    Returns the first element of the given iterable, or null if none. This method does not emit warning
  • immutableSet
    Returns the specified array as an immutable set, or null if the array is null. If the given array co
  • toArray
    Returns the elements of the given collection as an array. This method can be used when the valueClas
  • nonNull
    Returns the given set, or Collections#EMPTY_SET if the given set is null.
  • createSetForType
    Creates an initially empty set for elements of the given type. This method will creates specialized
  • emptySortedSet
    Returns a SortedSet which is always empty and accepts no element.Note: This method exists only on th
  • filter
    Returns an iterator over the elements of the given iterator where the predicate returns true. The it
  • identityEquals
    Returns true if the next elements returned by the given iterators are the same. This method compares
  • modifiableCopy
    Copies the content of the given map to a new unsynchronized, modifiable, in-memory map. The implemen
  • identityEquals,
  • modifiableCopy,
  • nonNullArraySet,
  • removeFromMultiValuesMap,
  • toCaseInsensitiveNameMap,
  • toCollection,
  • empty,
  • emptyQueue,
  • nonEmpty

Popular in Java

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Collectors (java.util.stream)
  • JCheckBox (javax.swing)
  • JLabel (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Best IntelliJ plugins
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