001/* 002 * ModeShape (http://www.modeshape.org) 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.modeshape.schematic.document; 017 018import org.modeshape.schematic.annotation.Immutable; 019 020@Immutable 021public class MinKey { 022 023 private static final String MIN_KEY_VALUE = ""; 024 025 protected static final MinKey INSTANCE = new MinKey(); 026 027 public static final MinKey getInstance() { 028 return INSTANCE; 029 } 030 031 private MinKey() { 032 // prevent instantiation 033 } 034 035 @Override 036 public int hashCode() { 037 return MIN_KEY_VALUE.hashCode(); 038 } 039 040 @Override 041 public boolean equals( Object obj ) { 042 return obj == this || obj instanceof MinKey; 043 } 044 045 @Override 046 public String toString() { 047 return "MaxKey"; 048 } 049}