/** * 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. }
/** * 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. }
/** * 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. }
/** * 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. }
/** * 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); }
/** * 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); }
/** * 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 * @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(); }
/** * 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 * @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(); }
/** * 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; }
/** * 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; }
return (MemberName) id; for (final GenericName alias : nonNull(parameter.getAlias())) { if (alias instanceof MemberName) { return (MemberName) alias;
return (MemberName) id; for (final GenericName alias : nonNull(parameter.getAlias())) { if (alias instanceof MemberName) { return (MemberName) alias;