Class Person

  • All Implemented Interfaces:
    one.xingyi.core.marshelling.HasJson<one.xingyi.core.marshelling.ContextForJson>, one.xingyi.core.marshelling.HasJsonWithLinks<one.xingyi.core.marshelling.ContextForJson,​Person>, one.xingyi.core.sdk.IXingYiResource, IPerson

    public class Person
    extends java.lang.Object
    implements one.xingyi.core.marshelling.HasJson<one.xingyi.core.marshelling.ContextForJson>, IPerson, one.xingyi.core.marshelling.HasJsonWithLinks<one.xingyi.core.marshelling.ContextForJson,​Person>
    • Constructor Summary

      Constructors 
      Constructor Description
      Person​(java.lang.String name, ITelephoneNumber telephone, java.lang.Integer age, java.lang.String line1, java.lang.String line2)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Integer age()  
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      java.lang.String line1()  
      java.lang.String line2()  
      java.lang.String name()  
      ITelephoneNumber telephone()  
      <J> J toJson​(one.xingyi.core.marshelling.JsonWriter<J> jsonWriter, one.xingyi.core.marshelling.ContextForJson context)  
      <J> J toJsonWithLinks​(one.xingyi.core.marshelling.JsonWriter<J> jsonWriter, one.xingyi.core.marshelling.ContextForJson context, java.util.function.Function<Person,​java.lang.String> stateFn)  
      java.lang.String toString()  
      Person withage​(java.lang.Integer age)  
      Person withline1​(java.lang.String line1)  
      Person withline2​(java.lang.String line2)  
      Person withtelephone​(ITelephoneNumber telephone)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface one.xingyi.core.marshelling.HasJson

        toJsonString
    • Constructor Detail

      • Person

        public Person​(java.lang.String name,
                      ITelephoneNumber telephone,
                      java.lang.Integer age,
                      java.lang.String line1,
                      java.lang.String line2)
    • Method Detail

      • name

        public java.lang.String name()
        Specified by:
        name in interface IPerson
      • age

        public java.lang.Integer age()
        Specified by:
        age in interface IPerson
      • withage

        public Person withage​(java.lang.Integer age)
        Specified by:
        withage in interface IPerson
      • line1

        public java.lang.String line1()
        Specified by:
        line1 in interface IPerson
      • withline1

        public Person withline1​(java.lang.String line1)
        Specified by:
        withline1 in interface IPerson
      • line2

        public java.lang.String line2()
        Specified by:
        line2 in interface IPerson
      • withline2

        public Person withline2​(java.lang.String line2)
        Specified by:
        withline2 in interface IPerson
      • toJson

        public <J> J toJson​(one.xingyi.core.marshelling.JsonWriter<J> jsonWriter,
                            one.xingyi.core.marshelling.ContextForJson context)
        Specified by:
        toJson in interface one.xingyi.core.marshelling.HasJson<one.xingyi.core.marshelling.ContextForJson>
      • toJsonWithLinks

        public <J> J toJsonWithLinks​(one.xingyi.core.marshelling.JsonWriter<J> jsonWriter,
                                     one.xingyi.core.marshelling.ContextForJson context,
                                     java.util.function.Function<Person,​java.lang.String> stateFn)
        Specified by:
        toJsonWithLinks in interface one.xingyi.core.marshelling.HasJsonWithLinks<one.xingyi.core.marshelling.ContextForJson,​Person>
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object