Class ValueObject

java.lang.Object
org.jparsec.examples.common.ValueObject
Direct Known Subclasses:
AliasedRelation, AltRule, Annotation, Annotation.Element, AnnotationDef, ArrayInitializer, ArraySubscriptExpression, ArrayTypeLiteral, AssertStatement, BetweenExpression, BinaryExpression, BinaryExpression, BinaryRelationalExpression, BlockStatement, BooleanLiteral, BreakStatement, CastExpression, CharLiteral, ClassDef, ClassInitializerDef, ClassLiteral, ConditionalExpression, ConstructorDef, ConstructorReference, ContinueStatement, CrossJoinRelation, DecimalPointNumberLiteral, DefBody, DoWhileStatement, EnumDef, ExpressionListStatement, ExpressionStatement, FieldDef, ForeachStatement, ForStatement, FullCaseExpression, FunctionExpression, GroupBy, Identifier, IfStatement, Import, InstanceOfExpression, IntegerLiteral, InterfaceDef, JoinRelation, LabelStatement, LambdaExpression, LambdaExpression.Parameter, LikeExpression, LiteralRule, LowerBoundWildcard, MethodCallExpression, MethodDef, MethodReference, NestedDef, NewArrayExpression, NewExpression, NumberExpression, OrderBy, OrderBy.Item, ParameterDef, PostfixUnaryExpression, PrefixUnaryExpression, Program, Projection, QualifiedExpression, QualifiedName, QualifiedName, QualifiedNameExpression, QuantifiedRule, ReturnStatement, RuleDef, RuleReference, ScientificNumberLiteral, Select, SequentialRule, SimpleCaseExpression, SimpleTypeLiteral, StringExpression, StringLiteral, SuperCallStatement, SuperExpression, SwitchStatement, SynchronizedBlockStatement, TableRelation, ThisCallStatement, ThisExpression, ThrowStatement, TryStatement, TryStatement.CatchBlock, TupleExpression, TypeParameterDef, UnaryExpression, UnaryRelationalExpression, UnionRelation, UpperBoundWildcard, VarStatement, VarStatement.Var, WhileStatement, WildcardExpression

public abstract class ValueObject extends Object
Base class that implements Object.equals(Object), Object.hashCode() and Object#toString() on final fields.
  • Field Details

  • Constructor Details

    • ValueObject

      public ValueObject()
  • Method Details

    • valueList

      private List<Object> valueList()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

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

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

      private static Field[] getValueFields(Class<?> type)
    • toValueList

      private static List<Object> toValueList(Object obj, Field[] fields)
    • introspectValueFields

      private static Field[] introspectValueFields(Class<?> type)
    • tail

      private static <T> List<T> tail(List<T> list)