001/* 002 * Copyright (c) 2007-2015 Concurrent, Inc. All Rights Reserved. 003 * 004 * Project and contact information: http://www.cascading.org/ 005 * 006 * This file is part of the Cascading project. 007 * 008 * Licensed under the Apache License, Version 2.0 (the "License"); 009 * you may not use this file except in compliance with the License. 010 * You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, software 015 * distributed under the License is distributed on an "AS IS" BASIS, 016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 017 * See the License for the specific language governing permissions and 018 * limitations under the License. 019 */ 020 021package cascading.flow.planner; 022 023import java.util.Objects; 024 025/** 026 * 027 */ 028public class PlannerInfo 029 { 030 public final String name; 031 public final String platform; 032 public final String registry; 033 034 public PlannerInfo( String name, String platform, String registry ) 035 { 036 this.name = name; 037 this.platform = platform; 038 this.registry = registry; 039 } 040 041 @Override 042 public boolean equals( Object object ) 043 { 044 if( this == object ) 045 return true; 046 if( object == null || getClass() != object.getClass() ) 047 return false; 048 049 PlannerInfo that = (PlannerInfo) object; 050 051 return Objects.equals( name, that.name ) && 052 Objects.equals( platform, that.platform ) && 053 Objects.equals( registry, that.registry ); 054 } 055 056 @Override 057 public int hashCode() 058 { 059 return Objects.hash( name, platform, registry ); 060 } 061 062 @Override 063 public String toString() 064 { 065 final StringBuilder sb = new StringBuilder(); 066 sb.append( name ).append( ':' ); 067 sb.append( platform ).append( ':' ); 068 sb.append( registry ); 069 return sb.toString(); 070 } 071 }