Class ValueType
- java.lang.Object
-
- org.inferred.freebuilder.processor.source.ValueType
-
- Direct Known Subclasses:
BuildableList,CheckedBiMap,CheckedBiMap.CheckedEntry,CheckedBiMap.CheckedEntryIterator,CheckedBiMap.CheckedEntrySet,CheckedList,CheckedListMultimap,CheckedMap,CheckedMap.CheckedEntry,CheckedMap.CheckedEntryIterator,CheckedMap.CheckedEntrySet,CheckedMultiset,CheckedNavigableSet,CheckedSet,CheckedSetMultimap,FieldAccess,FunctionalType,GeneratedType,GwtSupport.CustomValueSerializer,GwtSupport.GwtWhitelist,IdKey,LazyName,LazyName.Declaration,ListProperty.ImmutableListMethod,MapProperty.ImmutableMapMethod,MergeAction,QualifiedName,SetProperty.ImmutableSetMethod,Type,Variable
public abstract class ValueType extends java.lang.ObjectRepresents an instance that compares inObject.hashCode()andObject.equals(Object)using a sequence of fields. If two instances have the same runtime class and the same sequence of fields, then they are considered equal.This class implements the two
Objectmethods mentioned above as well asObject.toString().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceValueType.FieldReceiverAn object that receives fields (names and current values) for processing.private static classValueType.ReceiverIntoHashCodeA receiver that uses each received name and value to calculate a hash code.private static classValueType.ReceiverIntoListA receiver that adds all received field names and values into a list in order.private static classValueType.ReceiverIntoStringBuilderA receiver that puts each name and value into aStringBuilderthat generates a human- readable representation of the value.
-
Constructor Summary
Constructors Constructor Description ValueType()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddFields(ValueType.FieldReceiver fields)Implement this method to report the name and value of each field.booleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
addFields
protected abstract void addFields(ValueType.FieldReceiver fields)
Implement this method to report the name and value of each field.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-