1 package org.apache.archiva.admin.repository.admin;
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import java.io.Serializable;
22 import java.util.ArrayList;
23 import java.util.List;
26 * @author Olivier Lamy
30 implements Serializable
40 private List<String> patterns;
47 public FileType( String id, List<String> patterns )
50 this.patterns = patterns;
58 public void setId( String id )
63 public List<String> getPatterns()
65 if ( patterns == null )
67 this.patterns = new ArrayList<String>();
72 public void setPatterns( List<String> patterns )
74 this.patterns = patterns;
77 public void addPattern( String pattern )
79 getPatterns().add( pattern );
83 public boolean equals( Object o )
89 if ( o == null || getClass() != o.getClass() )
94 FileType fileType = (FileType) o;
96 if ( id != null ? !id.equals( fileType.id ) : fileType.id != null )
105 public int hashCode()
107 return id != null ? 37 + id.hashCode() : 0;