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

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

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

origin: apache/sis

/**
 * Returns identifiers which references elsewhere the object's defining information.
 * Alternatively identifiers by which this object can be referenced.
 *
 * @return this object identifiers, or an empty set if there is none.
 *
 * @see IdentifiedObjects#getIdentifier(IdentifiedObject, Citation)
 */
@Override
public Set<ReferenceIdentifier> getIdentifiers() {
  return nonNull(identifiers);    // Needs to be null-safe because we may have a null value on unmarshalling.
}
origin: org.apache.sis.core/sis-referencing

/**
 * Returns identifiers which references elsewhere the object's defining information.
 * Alternatively identifiers by which this object can be referenced.
 *
 * @return this object identifiers, or an empty set if there is none.
 *
 * @see IdentifiedObjects#getIdentifier(IdentifiedObject, Citation)
 */
@Override
public Set<ReferenceIdentifier> getIdentifiers() {
  return nonNull(identifiers);    // Needs to be null-safe because we may have a null value on unmarshalling.
}
origin: org.apache.sis.core/sis-referencing

/**
 * Returns alternative names by which this object is identified.
 *
 * @return the aliases, or an empty collection if there is none.
 *
 * @see #getName()
 */
@Override
public Collection<GenericName> getAlias() {
  return nonNull(alias);          // Needs to be null-safe because we may have a null value on unmarshalling.
}
origin: apache/sis

/**
 * Returns alternative names by which this object is identified.
 *
 * @return the aliases, or an empty collection if there is none.
 *
 * @see #getName()
 */
@Override
public Collection<GenericName> getAlias() {
  return nonNull(alias);          // Needs to be null-safe because we may have a null value on unmarshalling.
}
origin: org.apache.sis.core/sis-referencing

/**
 * Returns an estimation of the impact of this operation on point accuracy.
 * The positional accuracy gives position error estimates for target coordinates
 * of this coordinate operation, assuming no errors in source coordinates.
 *
 * @return the position error estimations, or an empty collection if not available.
 *
 * @see #getLinearAccuracy()
 */
@Override
public Collection<PositionalAccuracy> getCoordinateOperationAccuracy() {
  return CollectionsExt.nonNull(coordinateOperationAccuracy);
}
origin: apache/sis

/**
 * Returns an estimation of the impact of this operation on point accuracy.
 * The positional accuracy gives position error estimates for target coordinates
 * of this coordinate operation, assuming no errors in source coordinates.
 *
 * @return the position error estimations, or an empty collection if not available.
 *
 * @see #getLinearAccuracy()
 */
@Override
public Collection<PositionalAccuracy> getCoordinateOperationAccuracy() {
  return CollectionsExt.nonNull(coordinateOperationAccuracy);
}
origin: apache/sis

/**
 * Invoked by {@link #hashCode()} for computing the hash code when first needed.
 * This method is invoked at most once in normal execution, or an arbitrary amount of times if Java
 * assertions are enabled. The hash code value shall never change during the whole lifetime of this
 * object in a JVM. The hash code value does not need to be the same in two different executions of
 * the JVM.
 *
 * <div class="section">Overriding</div>
 * Subclasses can override this method for using more properties in hash code calculation.
 * All {@code computeHashCode()} methods shall invoke {@code super.computeHashCode()},
 * <strong>not</strong> {@code hashCode()}. Example:
 *
 * {@preformat java
 *     &#64;Override
 *     protected long computeHashCode() {
 *         return super.computeHashCode() + 31 * Objects.hash(myProperties);
 *     }
 * }
 *
 * @return the hash code value. This value may change in any future Apache SIS version.
 */
protected long computeHashCode() {
  return Objects.hash(name, nonNull(alias), nonNull(identifiers), remarks) ^ getInterface().hashCode();
}
origin: org.apache.sis.core/sis-referencing

/**
 * Invoked by {@link #hashCode()} for computing the hash code when first needed.
 * This method is invoked at most once in normal execution, or an arbitrary amount of times if Java
 * assertions are enabled. The hash code value shall never change during the whole lifetime of this
 * object in a JVM. The hash code value does not need to be the same in two different executions of
 * the JVM.
 *
 * <div class="section">Overriding</div>
 * Subclasses can override this method for using more properties in hash code calculation.
 * All {@code computeHashCode()} methods shall invoke {@code super.computeHashCode()},
 * <strong>not</strong> {@code hashCode()}. Example:
 *
 * {@preformat java
 *     &#64;Override
 *     protected long computeHashCode() {
 *         return super.computeHashCode() + 31 * Objects.hash(myProperties);
 *     }
 * }
 *
 * @return the hash code value. This value may change in any future Apache SIS version.
 */
protected long computeHashCode() {
  return Objects.hash(name, nonNull(alias), nonNull(identifiers), remarks) ^ getInterface().hashCode();
}
origin: org.apache.sis.core/sis-feature

/**
 * Returns an enumeration of valid values for the attribute, or an empty array if none.
 * This convenience method returns the value of the characteristic set by {@link #setValidValues(Object...)}.
 *
 * @return valid values for the attribute, or an empty array if none.
 */
@SuppressWarnings("unchecked")
public V[] getValidValues() {
  final Collection<?> c = CollectionsExt.nonNull((Collection<?>)
      getCharacteristic(AttributeConvention.VALID_VALUES_CHARACTERISTIC));
  final V[] values = (V[]) Array.newInstance(valueClass, c.size());
  int index = 0;
  for (final Object value : c) {
    values[index++] = (V) value;        // ArrayStoreException if 'value' is not the expected type.
  }
  return values;
}
origin: apache/sis

/**
 * Returns an enumeration of valid values for the attribute, or an empty array if none.
 * This convenience method returns the value of the characteristic set by {@link #setValidValues(Object...)}.
 *
 * @return valid values for the attribute, or an empty array if none.
 */
@SuppressWarnings("unchecked")
public V[] getValidValues() {
  final Collection<?> c = CollectionsExt.nonNull((Collection<?>)
      getCharacteristic(AttributeConvention.VALID_VALUES_CHARACTERISTIC));
  final V[] values = (V[]) Array.newInstance(valueClass, c.size());
  int index = 0;
  for (final Object value : c) {
    values[index++] = (V) value;        // ArrayStoreException if 'value' is not the expected type.
  }
  return values;
}
origin: org.apache.sis.core/sis-referencing

nonNull(alias).equals(nonNull(that.alias)) &&
nonNull(identifiers).equals(nonNull(that.identifiers)) &&
Objects.equals(remarks, that.remarks);
origin: apache/sis

nonNull(alias).equals(nonNull(that.alias)) &&
nonNull(identifiers).equals(nonNull(that.identifiers)) &&
Objects.equals(remarks, that.remarks);
origin: apache/sis

  return (MemberName) id;
for (final GenericName alias : nonNull(parameter.getAlias())) {
  if (alias instanceof MemberName) {
    return (MemberName) alias;
origin: org.apache.sis.core/sis-metadata

  return (MemberName) id;
for (final GenericName alias : nonNull(parameter.getAlias())) {
  if (alias instanceof MemberName) {
    return (MemberName) alias;
org.apache.sis.internal.utilCollectionsExtnonNull

Javadoc

Returns the given collection, or Collections#EMPTY_SET if the given collection is null.

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 map. 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
  • 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
  • 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

  • Making http post requests using okhttp
  • findViewById (Activity)
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 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