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

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

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

origin: apache/sis

/**
 * Returns the names of feature properties that this operation needs for performing its task.
 */
@Override
@SuppressWarnings("ReturnOfCollectionOrArrayField")
public synchronized Set<String> getDependencies() {
  if (dependencies == null) {
    dependencies = CollectionsExt.immutableSet(true, attributeNames);
  }
  return dependencies;
}
origin: apache/sis

/**
 * Returns the names of feature properties that this operation needs for performing its task.
 */
@Override
@SuppressWarnings("ReturnOfCollectionOrArrayField")
public synchronized Set<String> getDependencies() {
  if (dependencies == null) {
    dependencies = CollectionsExt.immutableSet(true, attributeNames);
  }
  return dependencies;
}
origin: org.apache.sis.core/sis-feature

/**
 * Returns the names of feature properties that this operation needs for performing its task.
 */
@Override
@SuppressWarnings("ReturnOfCollectionOrArrayField")
public synchronized Set<String> getDependencies() {
  if (dependencies == null) {
    dependencies = CollectionsExt.immutableSet(true, attributeNames);
  }
  return dependencies;
}
origin: org.apache.sis.core/sis-feature

/**
 * Returns the names of feature properties that this operation needs for performing its task.
 */
@Override
@SuppressWarnings("ReturnOfCollectionOrArrayField")
public synchronized Set<String> getDependencies() {
  if (dependencies == null) {
    dependencies = CollectionsExt.immutableSet(true, attributeNames);
  }
  return dependencies;
}
origin: org.apache.sis.core/sis-referencing

/**
 * Filters names, aliases and identifiers by their code spaces. If the given array is non-null, then the only names,
 * aliases and identifiers to be formatted are those having a {@link ReferenceIdentifier#getCodeSpace()},
 * {@link ScopedName#head()} or {@link GenericName#scope()} value in the given list, unless no name or alias
 * matches this criterion.
 *
 * @param codespaces  the preferred code spaces of names, aliases and identifiers to format, or {@code null}
 *        for accepting all of them. Some typical values are {@code "EPSG"}, {@code "OGC"} or {@code "GeoTIFF"}.
 */
public void setPreferredCodespaces(final String... codespaces) {
  Set<String> copy = null;
  if (codespaces != null) {
    copy = CollectionsExt.immutableSet(true, codespaces);
  }
  this.preferredCodespaces = copy;
}
origin: apache/sis

/**
 * Filters names, aliases and identifiers by their code spaces. If the given array is non-null, then the only names,
 * aliases and identifiers to be formatted are those having a {@link ReferenceIdentifier#getCodeSpace()},
 * {@link ScopedName#head()} or {@link GenericName#scope()} value in the given list, unless no name or alias
 * matches this criterion.
 *
 * @param codespaces  the preferred code spaces of names, aliases and identifiers to format, or {@code null}
 *        for accepting all of them. Some typical values are {@code "EPSG"}, {@code "OGC"} or {@code "GeoTIFF"}.
 */
public void setPreferredCodespaces(final String... codespaces) {
  Set<String> copy = null;
  if (codespaces != null) {
    copy = CollectionsExt.immutableSet(true, codespaces);
  }
  this.preferredCodespaces = copy;
}
origin: org.apache.sis.core/sis-utility

/**
 * Returns a copy of the given array as a non-empty immutable set.
 * If the given array is empty, then this method returns {@code null}.
 *
 * @param  <T>       the type of elements.
 * @param  elements  the elements to copy in a set.
 * @return an unmodifiable set which contains all the given elements, or {@code null}.
 *
 * @since 0.6
 */
@SafeVarargs
public static <T> Set<T> nonEmptySet(final T... elements) {
  final Set<T> asSet = immutableSet(true, elements);
  return (asSet != null && asSet.isEmpty()) ? null : asSet;
}
origin: Geomatys/geotoolkit

/**
 * Returns the specified array as an immutable set, or {@code null} if the array is null.
 * If the given array contains duplicated elements, i.e. elements that are equal in the
 * sense of {@link Object#equals(Object)}, then only the last instance of the duplicated
 * values will be included in the returned set.
 *
 * @param  <E> The type of array elements.
 * @param  array The array to copy in a set. May be {@code null}.
 * @return A set containing the array elements, or {@code null} if the given array was null.
 *
 * @see Collections#unmodifiableSet(Set)
 *
 * @since 3.17
 */
@SafeVarargs
public static <E> Set<E> immutableSet(final E... array) {
  return CollectionsExt.immutableSet(false, array);
}
origin: apache/sis

/**
 * Returns a copy of the given array as a non-empty immutable set.
 * If the given array is empty, then this method returns {@code null}.
 *
 * @param  <T>       the type of elements.
 * @param  elements  the elements to copy in a set.
 * @return an unmodifiable set which contains all the given elements, or {@code null}.
 *
 * @since 0.6
 */
@SafeVarargs
public static <T> Set<T> nonEmptySet(final T... elements) {
  final Set<T> asSet = immutableSet(true, elements);
  return (asSet != null && asSet.isEmpty()) ? null : asSet;
}
origin: org.apache.sis.core/sis-feature

/**
 * Sets an enumeration of valid values for the attribute.
 *
 * <p>This is a convenience method for {@link #addCharacteristic(Class)} with a value
 * of type {@link Set} and a conventional name.</p>
 *
 * @param  values  valid values.
 * @return {@code this} for allowing method calls chaining.
 *
 * @see #characteristics()
 * @see AttributeConvention#VALID_VALUES_CHARACTERISTIC
 */
@SafeVarargs
public final AttributeTypeBuilder<V> setValidValues(final V... values) {
  return setCharacteristic(AttributeConvention.VALID_VALUES_CHARACTERISTIC,
      Set.class, CollectionsExt.immutableSet(false, values));
}
origin: apache/sis

/**
 * Sets an enumeration of valid values for the attribute.
 *
 * <p>This is a convenience method for {@link #addCharacteristic(Class)} with a value
 * of type {@link Set} and a conventional name.</p>
 *
 * @param  values  valid values.
 * @return {@code this} for allowing method calls chaining.
 *
 * @see #characteristics()
 * @see AttributeConvention#VALID_VALUES_CHARACTERISTIC
 */
@SafeVarargs
public final AttributeTypeBuilder<V> setValidValues(final V... values) {
  return setCharacteristic(AttributeConvention.VALID_VALUES_CHARACTERISTIC,
      Set.class, CollectionsExt.immutableSet(false, values));
}
origin: org.apache.sis.core/sis-feature

  this.superTypes = Collections.emptySet();
} else {
  this.superTypes = CollectionsExt.immutableSet(true, superTypes);
  for (final FeatureType type : this.superTypes) {
    if (type instanceof NamedFeatureType) {
origin: org.apache.sis.core/sis-metadata

} else {
  clones(array);
  collection = CollectionsExt.immutableSet(false, array);
origin: apache/sis

} else {
  applyToAll(array);
  collection = CollectionsExt.immutableSet(false, array);
origin: apache/sis

  this.superTypes = Collections.emptySet();
} else {
  this.superTypes = CollectionsExt.immutableSet(true, superTypes);
  for (final FeatureType type : this.superTypes) {
    if (type instanceof NamedFeatureType) {
origin: apache/sis

  throw (IllegalArgumentException) illegalPropertyType(properties, ALIAS_KEY, value).initCause(e);
alias = immutableSet(true, names);
  identifiers = Collections.singleton((ReferenceIdentifier) value);
} else if (value instanceof ReferenceIdentifier[]) {
  identifiers = immutableSet(true, (ReferenceIdentifier[]) value);
} else {
  throw illegalPropertyType(properties, IDENTIFIERS_KEY, value);
origin: org.apache.sis.core/sis-referencing

  throw (IllegalArgumentException) illegalPropertyType(properties, ALIAS_KEY, value).initCause(e);
alias = immutableSet(true, names);
  identifiers = Collections.singleton((ReferenceIdentifier) value);
} else if (value instanceof ReferenceIdentifier[]) {
  identifiers = immutableSet(true, (ReferenceIdentifier[]) value);
} else {
  throw illegalPropertyType(properties, IDENTIFIERS_KEY, value);
org.apache.sis.internal.utilCollectionsExtimmutableSet

Javadoc

Returns the specified array as an immutable set, or null if the array is null. If the given array contains duplicated elements, i.e. elements that are equal in the sense of Object#equals(Object), then only the last instance of the duplicated values will be included in the returned set.

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
  • compact
    Returns a more compact representation of the given set. This method is similar to #unmodifiableOrCop
  • first
    Returns the first element of the given iterable, or null if none. This method does not emit warning
  • 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

  • Finding current android device location
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Best plugins for Eclipse
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