Class Version

java.lang.Object
org.elasticsearch.xpack.versionfield.Version
All Implemented Interfaces:
Comparable<Version>, BytesRefProducer, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentFragment

public class Version extends Object implements org.elasticsearch.xcontent.ToXContentFragment, BytesRefProducer, Comparable<Version>
Version value class, also exposed to scripting consumers.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent

    org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.lucene.util.BytesRef
     
    protected String
     

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY, EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Version(String version)
     
    Version(org.apache.lucene.util.BytesRef bytes)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    org.apache.lucene.util.BytesRef
     
     
    org.elasticsearch.xcontent.XContentBuilder
    toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment

    isFragment
  • Field Details

    • version

      protected String version
    • bytes

      protected org.apache.lucene.util.BytesRef bytes
  • Constructor Details

    • Version

      public Version(String version)
    • Version

      public Version(org.apache.lucene.util.BytesRef bytes)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • toBytesRef

      public org.apache.lucene.util.BytesRef toBytesRef()
      Specified by:
      toBytesRef in interface BytesRefProducer
    • compareTo

      public int compareTo(Version o)
      Specified by:
      compareTo in interface Comparable<Version>