public Identifier getActualTaggedTypeName(TaggedTypeRef struct) {
    Identifier structName = null;
    Identifier tag = struct.getTag();
    if (tag == null || tag.isPlain() && tag.toString().startsWith("_")) {
      TypeDef parentDef = as(struct.getParentElement(), TypeDef.class);
      if (parentDef != null) {
        structName =
            new Identifier.SimpleIdentifier(JNAeratorUtils.findBestPlainStorageName(parentDef));
      } else if (tag != null) {
        String better = tag.toString().substring(1);
        Pair<TypeDef, Declarator> pair = result.typeDefs.get(better);
        if (pair != null
            && pair.getFirst().getValueType() != null
            && pair.getSecond() instanceof DirectDeclarator) {
          TypeRef tr = pair.getFirst().getValueType();
          DirectDeclarator dd = (DirectDeclarator) pair.getSecond();

          if (tr instanceof SimpleTypeRef) {
            if (tag.equals(((SimpleTypeRef) tr).getName())) structName = ident(dd.resolveName());
          } else if (tr instanceof TaggedTypeRef) {
            if (tag.equals(((TaggedTypeRef) tr).getTag())) structName = ident(dd.resolveName());
          }
        }
      }
    }
    if (structName == null || structName.toString().equals("")) structName = tag;
    return structName == null ? null : structName.clone();
  }
  @Override
  public boolean equals(Object o) {
    if (o == this) return true;
    if (!(o instanceof ResourceBitmapLoader) || !super.equals(o)) return false;

    final ResourceBitmapLoader d = (ResourceBitmapLoader) o;
    Identifier id = (Identifier) mId;
    return id.equals(d.mId);
  }
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    ObjectName that = (ObjectName) o;

    return name.equals(that.name)
        && areEqual(catalog, that.catalog)
        && areEqual(schema, that.schema);
  }
 /**
  * Checks to see if an Beacon object is included in the matching criteria of this Region
  *
  * @param beacon the beacon to check to see if it is in the Region
  * @return true if is covered
  */
 public boolean matchesBeacon(Beacon beacon) {
   // All identifiers must match, or the corresponding region identifier must be null.
   for (int i = mIdentifiers.size(); --i >= 0; ) {
     final Identifier ident = mIdentifiers.get(i);
     if (beacon.mIdentifiers.size() <= i
         || ident != null && !ident.equals(beacon.mIdentifiers.get(i))) {
       return false;
     }
   }
   if (mBluetoothAddress != null
       && !mBluetoothAddress.equalsIgnoreCase(beacon.mBluetoothAddress)) {
     return false;
   }
   return true;
 }
 private boolean areEqual(Identifier one, Identifier other) {
   return one == null ? other == null : one.equals(other);
 }