private static boolean isPartitionTag(String[] partitions,String tagName){
  if (partitions != null) {
    for (    String partition : partitions) {
      if (partition.equals(tagName)) {
        return true;
      }
    }
  }
  return false;
}

private static boolean isPartitionTag ( String [ ] partitions , String tagName ) { if ( partitions != null ) { for ( String partition : partitions ) { if ( partition . equals ( tagName ) ) { return true ; } } } return false ; }
check if the tagname is one of the partition tags
