/** * 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<>(); }
/** * 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<>(); }
/** * 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); }
/** * 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); }
properties = CollectionsExt.compact(properties);
properties = CollectionsExt.compact(properties);
this.indices = CollectionsExt.compact(indices);
m.replaceAll((k, v) -> CollectionsExt.compact(v)); return m;
this.indices = CollectionsExt.compact(indices);
columns = CollectionsExt.compact(m);