1// © 2016 and later: Unicode, Inc. and others. 2// License & terms of use: http://www.unicode.org/copyright.html#License 3/* 4 ******************************************************************************* 5 * Copyright (C) 1996-2010, International Business Machines Corporation and * 6 * others. All Rights Reserved. * 7 ******************************************************************************* 8 */ 9package com.ibm.icu.text; 10 11/** 12 * A transliterator that leaves text unchanged. 13 */ 14class NullTransliterator extends Transliterator { 15 /** 16 * Package accessible IDs for this transliterator. 17 */ 18 static final String SHORT_ID = "Null"; 19 static final String _ID = "Any-Null"; 20 21 /** 22 * Constructs a transliterator. 23 */ 24 public NullTransliterator() { 25 super(_ID, null); 26 } 27 28 /** 29 * Implements {@link Transliterator#handleTransliterate}. 30 */ 31 @Override 32 protected void handleTransliterate(Replaceable text, 33 Position offsets, boolean incremental) { 34 offsets.start = offsets.limit; 35 } 36 37 /* (non-Javadoc) 38 * @see com.ibm.icu.text.Transliterator#addSourceTargetSet(boolean, com.ibm.icu.text.UnicodeSet, com.ibm.icu.text.UnicodeSet) 39 */ 40 @Override 41 public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) { 42 // do nothing 43 } 44} 45