congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Formatter.appendElement
Code IndexAdd Tabnine to your IDE (free)

How to use
appendElement
method
in
org.apache.sis.io.wkt.Formatter

Best Java code snippets using org.apache.sis.io.wkt.Formatter.appendElement (Showing top 4 results out of 315)

origin: apache/sis

/**
 * Appends an object or an array of objects.
 * This method performs the following choices:
 *
 * <ul>
 *   <li>If the given value is {@code null}, then this method appends the "{@code null}" string (without quotes).</li>
 *   <li>Otherwise if the given value is an array, then this method appends the opening sequence symbol, formats all
 *       elements by invoking this method recursively, then appends the closing sequence symbol.</li>
 *   <li>Otherwise if the value type is assignable to the argument type of one of the {@code append(…)} methods
 *       in this class, then the formatting will be delegated to that method.</li>
 *   <li>Otherwise the given value is appended as a quoted text with its {@code toString()} representation.</li>
 * </ul>
 *
 * @param  value  the value to append to the WKT, or {@code null}.
 */
public void appendAny(final Object value) {
  if (value == null) {
    appendSeparator();
    buffer.append("null");
  } else if (!appendValue(value) && !appendElement(value)) {
    append(value.toString(), null);
  }
}
origin: org.apache.sis.core/sis-metadata

/**
 * Appends an object or an array of objects.
 * This method performs the following choices:
 *
 * <ul>
 *   <li>If the given value is {@code null}, then this method appends the "{@code null}" string (without quotes).</li>
 *   <li>Otherwise if the given value is an array, then this method appends the opening sequence symbol, formats all
 *       elements by invoking this method recursively, then appends the closing sequence symbol.</li>
 *   <li>Otherwise if the value type is assignable to the argument type of one of the {@code append(…)} methods
 *       in this class, then the formatting will be delegated to that method.</li>
 *   <li>Otherwise the given value is appended as a quoted text with its {@code toString()} representation.</li>
 * </ul>
 *
 * @param  value  the value to append to the WKT, or {@code null}.
 */
public void appendAny(final Object value) {
  if (value == null) {
    appendSeparator();
    buffer.append("null");
  } else if (!appendValue(value) && !appendElement(value)) {
    append(value.toString(), null);
  }
}
origin: org.apache.sis.core/sis-metadata

try {
  formatter.setBuffer(buffer);
  valid = formatter.appendElement(object) || formatter.appendValue(object);
} finally {
origin: apache/sis

try {
  formatter.setBuffer(buffer);
  valid = formatter.appendElement(object) || formatter.appendValue(object);
} finally {
org.apache.sis.io.wktFormatterappendElement

Javadoc

Tries to append an object of the KEYWORD[something] form. The given value is typically, but not necessarily, a FormattableObject object or an instance of an interface that can be converted to FormattableObject.

Popular methods of Formatter

  • append
    Appends rows of numbers. Each number is separated by a space, and each row is separated by a comma.
  • newLine
    Request a line separator before the next element to format. Invoking this method before any append(…
  • <init>
    Creates a new formatter instance with the specified convention, symbols and indentation.
  • appendAny
    Appends an object or an array of objects. This method performs the following choices: * If the given
  • getConvention
    Returns the convention to use for formatting the WKT. The default is Convention#WKT2.
  • getEnclosingElement
    Returns the enclosing WKT element, or null if element being formatted is the root. This method can b
  • getLocale
    Returns the locale to use for localizing InternationalString instances. This is not the locale for
  • indent
    Increases or decreases the indentation. A value of +1 increases the indentation by the amount of spa
  • setInvalidWKT
    Marks the current WKT representation of the given object as not strictly compliant with the WKT spec
  • toWKT
    Returns the WKT formatted by this object.
  • addContextualUnit
    Adds a unit to use for the next measurements of the quantity Q. The given unit will apply to all WKT
  • appendComplement
    Appends the optional complementary attributes common to many IdentifiedObject subtypes. Those attrib
  • addContextualUnit,
  • appendComplement,
  • appendExact,
  • appendForSubtypes,
  • appendOnNewLine,
  • appendPreset,
  • appendSeparator,
  • appendTemporalExtent,
  • appendValue

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Github Copilot alternatives
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