IT. Expert System.

Android Reference

FieldPosition


java.text

Class FieldPosition



  • public class FieldPosition
    extends Object
    Identifies fields in formatted strings. If a FieldPosition is passed to the format method with such a parameter, then the indices will be set to the start and end indices of the field in the formatted string.

    A FieldPosition can be created by using the integer constants in the various format classes (for example NumberFormat.INTEGER_FIELD) or one of the fields of type Format.Field.

    If more than one field information is needed, the method Format.formatToCharacterIterator(Object) should be used.

    • Constructor Summary

      Constructors
      Constructor and Description
      FieldPosition(Format.Field attribute)
      Constructs a new FieldPosition for the specified Field attribute.
      FieldPosition(Format.Field attribute, int field)
      Constructs a new FieldPosition for the specified Field attribute and field id.
      FieldPosition(int field)
      Constructs a new FieldPosition for the specified field.
    • Constructor Detail

      • FieldPosition

        public FieldPosition(int field)
        Constructs a new FieldPosition for the specified field.
        Parameters:
        field - the field to identify.
      • FieldPosition

        public FieldPosition(Format.Field attribute)
        Constructs a new FieldPosition for the specified Field attribute.
        Parameters:
        attribute - the field attribute to identify.
      • FieldPosition

        public FieldPosition(Format.Field attribute,
                     int field)
        Constructs a new FieldPosition for the specified Field attribute and field id.
        Parameters:
        attribute - the field attribute to identify.
        field - the field to identify.
    • Method Detail

      • equals

        public boolean equals(Object object)
        Compares the specified object to this field position and indicates if they are equal. In order to be equal, object must be an instance of FieldPosition with the same field, begin index and end index.
        Overrides:
        equals in class Object
        Parameters:
        object - the object to compare with this object.
        Returns:
        true if the specified object is equal to this field position; false otherwise.
        See Also:
        hashCode()
      • getBeginIndex

        public int getBeginIndex()
        Returns the index of the beginning of the field.
        Returns:
        the first index of the field.
      • getEndIndex

        public int getEndIndex()
        Returns the index one past the end of the field.
        Returns:
        one past the index of the last character in the field.
      • getField

        public int getField()
        Returns the field which is being identified.
        Returns:
        the field constant.
      • getFieldAttribute

        public Format.Field getFieldAttribute()
        Returns the attribute which is being identified.
        Returns:
        the field.
      • hashCode

        public int hashCode()
        Description copied from class: Object
        Returns an integer hash code for this object. By contract, any two objects for which Object.equals(java.lang.Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

        Note that hash values must not change over time unless information used in equals comparisons also changes.

        See Writing a correct hashCode method if you intend implementing your own hashCode method.

        Overrides:
        hashCode in class Object
        Returns:
        this object's hash code.
        See Also:
        Object.equals(java.lang.Object)
      • setBeginIndex

        public void setBeginIndex(int index)
        Sets the index of the beginning of the field.
        Parameters:
        index - the index of the first character in the field.
      • setEndIndex

        public void setEndIndex(int index)
        Sets the index of the end of the field.
        Parameters:
        index - one past the index of the last character in the field.
      • toString

        public String toString()
        Returns the string representation of this field position.
        Overrides:
        toString in class Object
        Returns:
        the string representation of this field position.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 229 / 158680688. Delta: 0.05602 с