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 Detail

      • Person

        public Person​(java.lang.String name,
                      java.lang.Integer age,
                      IAddress address,
                      ITelephoneNumber telephone)
    • 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
      • 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