static int hashCode(final @NonNull InstanceIdentifierTypeDefinition type) { return Objects.hash(type.getPath(), type.getUnknownSchemaNodes(), type.getBaseType(), type.getUnits().orElse(null), type.getDefaultValue().orElse(null), type.requireInstance()); }
@Override public boolean equals(final Object obj) { return InstanceIdentifierTypeDefinition.equals(this, obj); } }
@Override public int hashCode() { return InstanceIdentifierTypeDefinition.hashCode(this); }
private static TypeDefinition<?> baseTypeIfNotConstrained(final @NonNull InstanceIdentifierTypeDefinition type) { final InstanceIdentifierTypeDefinition base = type.getBaseType(); return type.requireInstance() == base.requireInstance() ? base : type; }
static boolean equals(final @NonNull InstanceIdentifierTypeDefinition type, final @Nullable Object obj) { if (type == obj) { return true; } final InstanceIdentifierTypeDefinition other = TypeDefinitions.castIfEquals( InstanceIdentifierTypeDefinition.class, type, obj); return other != null && type.requireInstance() == other.requireInstance(); }
private void write(final @NonNull ValueWriter writer, final @NonNull InstanceIdentifierTypeDefinition type, final @NonNull Object value) throws XMLStreamException { if (value instanceof YangInstanceIdentifier) { writeInstanceIdentifier(writer, (YangInstanceIdentifier)value); } else { final QName qname = type.getQName(); LOG.warn("Value of {}:{} is not an InstanceIdentifier but {}", qname.getNamespace(), qname.getLocalName(), value.getClass()); writer.writeToStringCharacters(value); } }
static boolean equals(final @NonNull InstanceIdentifierTypeDefinition type, final @Nullable Object obj) { if (type == obj) { return true; } final InstanceIdentifierTypeDefinition other = TypeDefinitions.castIfEquals( InstanceIdentifierTypeDefinition.class, type, obj); return other != null && type.requireInstance() == other.requireInstance(); }
private static TypeDefinition<?> baseTypeIfNotConstrained(final @NonNull InstanceIdentifierTypeDefinition type) { final InstanceIdentifierTypeDefinition base = type.getBaseType(); return type.requireInstance() == base.requireInstance() ? base : type; }
static int hashCode(final @NonNull InstanceIdentifierTypeDefinition type) { return Objects.hash(type.getPath(), type.getUnknownSchemaNodes(), type.getBaseType(), type.getUnits().orElse(null), type.getDefaultValue().orElse(null), type.requireInstance()); }
private void emitInstanceIdentifierSpecification(final InstanceIdentifierTypeDefinition typeDefinition) { emitRequireInstanceNode(typeDefinition.requireInstance()); }
@Override public boolean equals(final Object obj) { return InstanceIdentifierTypeDefinition.equals(this, obj); }
@Override public int hashCode() { return InstanceIdentifierTypeDefinition.hashCode(this); }
static String toString(final @NonNull InstanceIdentifierTypeDefinition type) { return TypeDefinitions.toStringHelper(type).add("requireInstance", type.requireInstance()).toString(); } }
@Override public boolean equals(final Object obj) { return InstanceIdentifierTypeDefinition.equals(this, obj); }
@Override public int hashCode() { return InstanceIdentifierTypeDefinition.hashCode(this); }
static String toString(final @NonNull InstanceIdentifierTypeDefinition type) { return TypeDefinitions.toStringHelper(type).add("requireInstance", type.requireInstance()).toString(); } }
@Override public boolean equals(final Object obj) { return InstanceIdentifierTypeDefinition.equals(this, obj); } }
@Override public int hashCode() { return InstanceIdentifierTypeDefinition.hashCode(this); }
@Override InstanceIdentifierTypeDefinition buildType() { final InstanceIdentifierTypeDefinition base = getBaseType(); if (getRequireInstance() == base.requireInstance()) { return base; } return new RestrictedInstanceIdentifierType(base, getPath(), getUnknownSchemaNodes(), getRequireInstance()); } }
@Override public boolean equals(final Object obj) { return InstanceIdentifierTypeDefinition.equals(this, obj); }