private int fetch(State parent, List<Map.Entry<Integer, State>> siblings)
    {
        if (parent.isAcceptable())
        {
            State fakeNode = new State(-(parent.getDepth() + 1));  // 此节点是parent的子节点，同时具备parent的输出
            fakeNode.addEmit(parent.getLargestValueId());
            siblings.add(new AbstractMap.SimpleEntry<Integer, State>(0, fakeNode));
        }
        for (Map.Entry<Character, State> entry : parent.getSuccess().entrySet())
        {
            siblings.add(new AbstractMap.SimpleEntry<Integer, State>(entry.getKey() + 1, entry.getValue()));
        }
        return siblings.size();
    }
private int fetch ( State parent , List < Map . Entry < Integer , State > > siblings ) { if ( parent . isAcceptable ( ) ) { State fakeNode = new State ( - ( parent . getDepth ( ) + 1 ) ) ; fakeNode . addEmit ( parent . getLargestValueId ( ) ) ; siblings . add ( new AbstractMap . SimpleEntry < Integer , State > ( 0 , fakeNode ) ) ; } for ( Map . Entry < Character , State > entry : parent . getSuccess ( ) . entrySet ( ) ) { siblings . add ( new AbstractMap . SimpleEntry < Integer , State > ( entry . getKey ( ) + 1 , entry . getValue ( ) ) ) ; } return siblings . size ( ) ; }
获取直接相连的子节点

@param parent   父节点
@param siblings （子）兄弟节点
@return 兄弟节点个数