congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
org.apache.sis.util
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.sis.util

Best Java code snippets using org.apache.sis.util (Showing top 20 results out of 315)

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

@Override public CharSequence subSequence(final int start, final int end) {
  ArgumentChecks.ensureValidIndexRange(length, start, end);
  final int n = end - start;
  return (n == length) ? this : spaces(n);
}
origin: org.apache.sis.core/sis-metadata

/**
 * Returns a string representation for debugging purpose only.
 */
@Debug
@Override
public String toString() {
  String name = Classes.getShortName(type);
  if (propertyType != Object.class) {
    name = name + " as " + Classes.getShortName(propertyType);
  }
  return name;
}
origin: org.apache.sis.core/sis-metadata

  /**
   * Returns a string representation of the object pair for debugging purpose only.
   */
  @Debug
  @Override
  public String toString() {
    return '(' + Classes.getShortClassName(o1) + ", " + Classes.getShortClassName(o2) + ')';
  }
}
origin: org.apache.sis.core/sis-utility

/**
 * Creates a new instance for the given type of values.
 *
 * @param type    base type of all values in the column identified by this instance.
 * @param header  the text to display as column header.
 */
public TableColumn(final Class<V> type, final CharSequence header) {
  ArgumentChecks.ensureNonNull("type",   this.type   = type);
  ArgumentChecks.ensureNonNull("header", this.header = header);
}
origin: org.apache.sis.core/sis-utility

/**
 * Returns {@code true} if the given character sequence starts with the given prefix.
 *
 * @param  text         the characters sequence to test.
 * @param  prefix       the expected prefix.
 * @param  ignoreCase   {@code true} if the case should be ignored.
 * @return {@code true} if the given sequence starts with the given prefix.
 * @throws NullPointerException if any of the arguments is null.
 */
public static boolean startsWith(final CharSequence text, final CharSequence prefix, final boolean ignoreCase) {
  return regionMatches(text, 0, prefix, ignoreCase);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Returns the number of elements (e.g. {@code "elt_0_0"}) when formatting the parameter descriptors
 * for a tensor of the given size. This is the total number of elements in the tensor.
 */
private int numElements(final int[] actualSize) {
  int n = 1;
  for (int s : actualSize) {
    ArgumentChecks.ensurePositive("actualSize", s);
    n *= s;
  }
  return n;
}
origin: org.apache.sis.core/sis-referencing

/**
 * Returns {@code true} if the given name or identifier is deprecated.
 *
 * @see #isDeprecated()
 */
private static boolean isDeprecated(final Object object) {
  return (object instanceof Deprecable) && ((Deprecable) object).isDeprecated();
}
origin: org.apache.sis.core/sis-utility

/**
 * Parses the given string. Callers shall catch the {@link NumberFormatException}
 * and handle the error according the caller's method contract.
 *
 * @throws NumberFormatException if the parsing failed.
 */
private Object valueOf(final String source) throws NumberFormatException {
  return (type != Number.class) ? Numbers.valueOf(source, type) : Numbers.narrowestNumber(source);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Sets the coordinate reference system in which the coordinate is given.
 *
 * @param  crs  the new coordinate reference system, or {@code null}.
 */
public void setCoordinateReferenceSystem(final CoordinateReferenceSystem crs) {
  ensureDimensionMatches("crs", 1, crs);
  this.crs = crs;
}
origin: org.apache.sis.core/sis-referencing

/**
 * Must be overridden, since the super-class method does not handle the index range
 * for performance reasons.
 */
@Override
public double getUpper(final int dimension) throws IndexOutOfBoundsException {
  ensureValidIndex(endIndex, dimension);
  return ordinates[dimension + beginIndex + (ordinates.length >>> 1)];
}
origin: org.apache.sis.core/sis-utility

/**
 * Creates a new derived set from the specified storage set.
 *
 * @param storage    the set which actually store the elements.
 * @param converter  the type of elements in this derived set.
 */
Invertible(final Set<S> storage, final ObjectConverter<S,E> converter) {
  super(storage, converter);
  inverse = converter.inverse();
}
origin: org.apache.sis.core/sis-referencing

  /**
   * Returns the values as an array.
   */
  public int[] toArray() {
    return CharSequences.parseInts(value, ' ', 10);
  }
}
origin: org.apache.sis.core/sis-utility

/**
 * Returns {@code true} if this comparison ignores metadata.
 * This method currently returns {@code true} for {@code IGNORE_METADATA}, {@code APPROXIMATIVE}
 * or {@code DEBUG} only, but this list may be extended in future SIS versions.
 *
 * @return whether this comparison ignore metadata.
 *
 * @since 0.6
 */
public boolean isIgnoringMetadata() {
  return ordinal() >= IGNORE_METADATA.ordinal();
}
origin: org.apache.sis.core/sis-utility

/**
 * Constructs a set of the specified type.
 *
 * @param type  the element type (can not be null).
 */
public CheckedHashSet(final Class<E> type) {
  super();
  this.type = type;
  ensureNonNull("type", type);
}
origin: apache/sis

@Override public CharSequence subSequence(final int start, final int end) {
  ArgumentChecks.ensureValidIndexRange(length, start, end);
  final int n = end - start;
  return (n == length) ? this : spaces(n);
}
origin: org.apache.sis.core/sis-metadata

/**
 * Creates a new representative fraction from the specified denominator.
 *
 * @param  denominator  the denominator as a positive number, or 0 if unspecified.
 * @throws IllegalArgumentException if the given value is negative.
 */
public DefaultRepresentativeFraction(final long denominator) {
  ArgumentChecks.ensurePositive("denominator", denominator);
  this.denominator = denominator;
}
origin: org.apache.sis.core/sis-utility

/**
 * Returns {@code true} if this comparison uses a tolerance threshold.
 * This method currently returns {@code true} for {@code APPROXIMATIVE} or {@code DEBUG} only,
 * but this list may be extended in future SIS versions.
 *
 * @return whether this comparison uses a tolerance threshold.
 *
 * @since 0.6
 */
public boolean isApproximative() {
  return ordinal() >= APPROXIMATIVE.ordinal();
}
origin: org.apache.sis.core/sis-utility

/**
 * Constructs a set of the specified type and initial capacity.
 *
 * @param type      the element type (should not be null).
 * @param capacity  the initial capacity.
 */
public CheckedHashSet(final Class<E> type, final int capacity) {
  super(capacity);
  this.type = type;
  ensureNonNull("type", type);
}
origin: org.apache.sis.core/sis-metadata

/**
 * Creates a dimension initialized to the given type and size.
 *
 * @param  dimensionName  the name of the axis, or {@code null} if none, or {@code null} if none.
 * @param  dimensionSize  the number of elements along the axis, or {@code null} if none.
 * @throws IllegalArgumentException if {@code dimensionSize} is negative.
 */
public DefaultDimension(final DimensionNameType dimensionName, final int dimensionSize) {
  ArgumentChecks.ensurePositive("dimensionSize", dimensionSize);
  this.dimensionName = dimensionName;
  this.dimensionSize = dimensionSize;
}
origin: org.apache.sis.core/sis-referencing

/**
 * Sets the domain of the search (for example whether to include deprecated objects in the search).
 * If this method is never invoked, then the default value is {@link Domain#VALID_DATASET}.
 *
 * @param  domain  the domain of the search.
 */
public void setSearchDomain(final Domain domain) {
  ArgumentChecks.ensureNonNull("domain", domain);
  this.domain = domain;
}
org.apache.sis.util

Most used classes

  • ArgumentChecks
    Static methods for performing argument checks. Every methods in this class can throw one of the foll
  • Logging
    A set of utilities method for configuring loggings in SIS. Library implementors should fetch their l
  • ArraysExt
    Static methods for simple operations on arrays and array elements. This is an extension to the stand
  • CharSequences
    Static methods working with CharSequence instances. Some methods defined in this class duplicate the
  • Errors
    Locale-dependent resources for error messages.Argument order convention This resource bundle applies
  • Debug,
  • SimpleInternationalString,
  • Version,
  • Vocabulary,
  • Types,
  • Utilities,
  • Numbers,
  • Workaround,
  • BackingStoreException,
  • TreeTable$Node,
  • Containers,
  • WeakHashSet,
  • WeakValueHashMap,
  • WarningListeners
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now